Error compiling DLL

Hi,

I'm having a constant error in my DLL regarding one simple function: I get the error:


double *(double)' differs in levels of indirection from 'double (double)'


The declaration is:

extern EXP32 double *FAR PASCAL_CONV utc2tdb(double jd);

What can be the problem?

Kind regards,

JKepler
looks like you might be returning a double, rather than a pointer to a double?
Hello,

Soryy - I'm not an expert in C++, just a beginner... :(

Where should I look for the error and make the correction?

JKepler
have a google of "differs in levels of indirection from 'double (double)'". it'll give you some idea of the issue.
All i would say is that it's not a dll-specific thing.
Do you have the implementation of that function?
Last edited on
Here it is:

double FAR PASCAL_CONV utc2tdb( double jd)
{

double tdb;
double tt;
double dret[2];
char serr;
int rval;
int y0,m0,d0,h0,min0;
double h,temp,s0;
int32 flag = 0;
double d = 0;
double TDBmTT = 0;
double dgrd = 0;
int zmod = 0;
double JJ;
dgrd = 3.1415926535897930/180;

/* Etc... */

return tdb;

}
well there you go.
implementation:

1
2
3
4
5
6
7
double FAR PASCAL_CONV utc2tdb( double jd)
{
 .....
.....
    return tdb;  // i.e. return a double

}


but the extern declaration:
 
extern EXP32 double *FAR PASCAL_CONV utc2tdb(double jd);


is saying return a pointer.

what happens if you remove the asterisk from the extern declaration.
error LNK2019: unresolved external symbol _utc_to_jd referenced in function _utc2tdb@8

JKepler
Different problem. Sounds like you have a declaration for _utc_to_jd, but no implementation for it. Or at least the linker didn't find the implementation.
Topic archived. No new replies allowed.