2005-04-0708:07 PM - last edited on 2023-08-0712:08 PM by Doreena Deng
2005-04-0708:07 PM
Using the rendering API I bumped into the following problem:
To use the FreeImage library I include its header and link its .lib file. The whole library uses __cdecl. It has function names like this: FreeImage_Save(...)
In the .lib it looks like this: _FreeImage_Save@16
But when I try to build my project the linker says it cannot find the implementation for the function named: _FreeImage_Save
(I am pretty sure it doesn't have to do with the extern "C" thing. )
I have just downloaded it. The header file declaration is
DLL_API BOOL DLL_CALLCONV FreeImage_Save()
DLL_CALLCONV should be __stdcall. Make sure you project has
defined WIN32 macro and NOT defined FREEIMAGE_LIB and __WIN32__
( it is at the begin of the FreeImage.h header )