Link to home
Start Free TrialLog in
Avatar of jamie_lynn
jamie_lynn

asked on

What does relocation error with link time reference mean?

Hi,

I am getting this error when I try to run my application.
relocation error: test: symbol _Z17DBReadLicenseFilePKcP10a_db_parms, version dbsrv_r.so not defined in file dbsrv_r.so with link time reference

What does this relocation error mean? How can I fix this?

Thanks
Jamie
Avatar of Infinity08
Infinity08
Flag of Belgium image

This might be a problem with C++ name mangling ... try putting extern "C" {} around the include.
ASKER CERTIFIED SOLUTION
Avatar of itsmeandnobodyelse
itsmeandnobodyelse
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>> #extern "C"

just without the # ;)
>>>> just without the # ;)

Most likely the compiler would have complained but thank you nevertheless for reading thoroughly ;-)

>>>> extern "C"  DBRead* ReadLicenseFile(char*, db_parm*);
Note the types were a guess only. I actually don't know the rules of name mangling and it differs between compilers.




Note that I said the same thing as in the accepted answer, just with less words ;)