Jul 25, 2014 at 1:22pm UTC
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
Jul 25, 2014 at 1:29pm UTC
looks like you might be returning a double, rather than a pointer to a double?
Jul 25, 2014 at 1:31pm UTC
Hello,
Soryy - I'm not an expert in C++, just a beginner... :(
Where should I look for the error and make the correction?
JKepler
Jul 25, 2014 at 1:41pm UTC
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 Jul 25, 2014 at 1:42pm UTC
Jul 25, 2014 at 1:55pm UTC
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;
}
Jul 25, 2014 at 2:39pm UTC
error LNK2019: unresolved external symbol _utc_to_jd referenced in function _utc2tdb@8
JKepler
Jul 25, 2014 at 2:54pm UTC
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.