error LNK2019: unresolved external symbol
Hi, I'm having a link error problem and I don't know how to fix it.
Please help me out.
error LNK2019: unresolved external symbol _Validate@1068 referenced in
function...........
I use VS2005
I have a static library with the following C++ settings:
/Od /D "WIN32" /D "_DEBUG" /D "_LIB" /D "_UNICODE" /D "UNICODE" /Gm /
EHsc /RTC1 /MDd /Yu"stdafx.h" /Fp"Debug\Licensor.pch" /Fo"Debug\\" /
Fd"Debug\vc80.pdb" /W3 /nologo /c /Wp64 /ZI /TP /errorReport:prompt
It uses __cdecl (/Gd) calling convention.
In the header file, I have
#if __cplusplus
extern "C" {
#endif
__declspec(dllexport) int WINAPI Validate(CHAR szNewKey[], int length,
LICENSEDATA licData, LICENSEDATA* extLicData);
#if __cplusplus
}
#endif
I have a win32 project that links to the static library in order to
call the Validate function. It has the following C++ settings:
/Od /I "..\..\Licensor" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D
"VERBOSE" /D "_VC80_UPGRADE=0x0600" /D "_MBCS" /FD /EHsc /MTd /Fp".
\Debug/Temp.pch" /Fo".\Debug/" /Fd".\Debug/" /W4 /nologo /c /ZI /TP /
errorReport:prompt
It too uses __cdecl (/Gd) calling convention.
I'm not sure what to change. Should I be using __stdcall (/Gz) calling
convention for the project? I tried that but no luck either.