| mblatch 2006-05-20, 7:03 pm |
| I have a library provided by a third party with functions I need access
to. I include their prototypes in my app, but the thing won't link:
gives me an unresolved external symbol, but the library is definitely
being checked.
Their supplied function prototype:
int test1(double x[],double y[],int &i, int &j, double c[], int c_i[]);
When I use function:
int status;
double *x;
double *y;
int i;
int j;
double *c;
int *c_i;
status=test1(x,y,i,j,c,c_i);
Linker error:
Error 7 error LNK2019: unresolved external symbol "int __cdecl
test1(double * const,double * const,int &,int &,double * const,int *
const)" (?test1@@YAHQAN0AAH10QAH@Z) referenced in function
_main TEST.obj
I did a "lib -list" on the external library and see the following:
?test1@@YAHQAN0AAH10QAH0@Z.................................\obj\d_test1.obj
Of interest is the additional "0" that shows up at the end of the
definition in the library. I'm guessing this is indicative that the
prototype they gave me is not exactly the same as how it was built, but
they claim everything's o.k. Is there a way of decoding these cyptic
library definitions to see what the argument types are?
Also has been suggested that they built the library with MS Visual C++
13 and I am using MS Visual Studio 2005. I would have expected
libraries to be a little more portable that that.
Thanks,Mike
|