I'm trying to compile my project with a third party library, using Visual Studio 2008. Now the thing is that I added the lib file to LINKER input, updated the additional library locations - made sure that the lib file is indeed read (removed the additional location and compilation failed, screaming that lib file was not found). I checked the exports present in the lib with dumpbin and the functionality is present.
Yet I'm still getting Error LINK2019 unresolved bla bla bla when calling the functions from that library. Anyone faced anything similar/has any idea? Maybe its worth saying that it seems that the library I'm trying to use was compiled using VS2003.
Update: definition as appears in library header:
#ifndef X
#define X
#ifdef _cplusplus
extern "C" {
#endif
_XFUNC int X_Open(int C);
#ifdef _cplusplus
}
#endif
#endif
And the definition of export: (in another header included in the library header)
#ifdef _BUILDXDLL
#define _XFUNC __declspec (dllexport)
#else
#ifdef WIN32
#define _XFUNC __declspec (dllimport)
#else
#define _XFUNC
#endif
#endif
Full Error Message:
error LNK2019: unresolved external symbol _X_Open referenced in function "public virtual bool __thiscall MyClass::initialise(class QDomElement*)"(?initialise@MyClass@@UAE_NPAV QDomElement @@@Z)
I'm not sure if it's relevant, but the declaration is *X_Open* and in the error message it appears as *_X_Open* Thanks in advance, Anorflame