__fastcall issue?
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2005-04-07
08:07 PM
- last edited on
2023-08-07
12:08 PM
by
Doreena Deng
2005-04-07
08: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. )
Any solutions would be very welcome.
Chrispy
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. )
Any solutions would be very welcome.
Chrispy
Labels:
- Labels:
-
Add-On (C++)
3 REPLIES 3

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2005-04-08 06:21 AM
2005-04-08
06:21 AM
_FreeImage_Save@16It looks like __stdcall name decoration.
Is the functions in the header file of FreeImage library decrared
like __stdcall FreeImage_Save(...) or just FreeImage_Save(...) ?
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2005-04-08 10:16 AM
2005-04-08
10:16 AM
The header files are simply FreeImage_Save(...)
Why does the linker search for _FreeImage_Save() ?
Why does the linker search for _FreeImage_Save() ?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2005-04-08 11:20 AM
2005-04-08
11:20 AM
Is the FreeImage libarary from sourceforge ?
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 )
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 )