FreeImage 3.18.0 compiled under VS2017
Click FreeImage.2017.sln solution
Dynamic Library compilation Click to generate Engineering FreeImage
Note: the precompiler adds the precompiled definition FREEIMAGE_EXPORTS to export the function.
Static library compilation Click to generate Engineering FreeImageLib
Note: pre-compiled definition FREEIMAGE_LIB is added to the precompiler + precompiler.
The output file is saved in Dist/x32
The macro definition compilation details of the header file are as follows:
# if defined (FREEIMAGE_LIB)
# define DLL_API
# define DLL_CALLCONV
# else
# if defined (_ WIN32) | | defined (_ _ WIN32__)
# define DLL_CALLCONV _ _ stdcall
/ / The following ifdef block is the standard way of creating macros which make exporting
/ / from a DLL simpler. All files within this DLL are compiled with the FREEIMAGE_EXPORTS
/ / symbol defined on the command line. This symbol should not be defined on any project
/ / that uses this DLL. This way any other project whose source files include this file see
/ / DLL_API functions as being imported from a DLL, wheras this DLL sees symbols
/ / defined with this macro as being exported.
# ifdef FREEIMAGE_EXPORTS
# define DLL_API _ _ declspec (dllexport)
# else
# define DLL_API _ _ declspec (dllimport)
# endif / / FREEIMAGE_EXPORTS
# else
/ / try the gcc visibility support (see http://gcc.gnu.org/wiki/Visibility)
# if defined (_ _ GNUC__) & & ((_ _ GNUC__ > = 4) | | (_ _ GNUC__ = = 3 & & _ _ GNUC_MINOR__ > = 4))
# ifndef GCC_HASCLASSVISIBILITY
# define GCC_HASCLASSVISIBILITY
# endif
# endif / / _ _ GNUC__
# define DLL_CALLCONV
# if defined (GCC_HASCLASSVISIBILITY)
# define DLL_API _ attribute__ ((visibility ("default")
# else
# define DLL_API
# endif
# endif / / WIN32 /! WIN32
# endif / / FREEIMAGE_LIB
Analysis of problems
The severity code indicates that the project file line forbids display status
Error external symbol _ _ imp__FreeImage_ConvertToGreyscale@4 that cannot be parsed by LNK2019 The symbol is referenced in the function "public: virtual struct std::pair _ _ thiscall Ogre::FreeImageCodec::decode (class Ogre::SharedPtr &) const" (? decode@FreeImageCodec@Ogre@@UBE?AU?$pair@V?$SharedPtr@VMemoryDataStream@Ogre@@@Ogre@@V?$SharedPtr@VCodecData@Codec@Ogre@@@2@@std@@AAV?$SharedPtr@VDataStream@Ogre@@@2@@Z) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_Initialise@4 that cannot be parsed by LNK2019, which is referenced in the function "public: static void _ _ cdecl Ogre::FreeImageCodec::startup (void)" (? startup@FreeImageCodec@Ogre@@SAXXZ) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_DeInitialise@0 that cannot be parsed by LNK2019, which is referenced in the function "public: static void _ _ cdecl Ogre::FreeImageCodec::shutdown (void)" (? shutdown@FreeImageCodec@Ogre@@SAXXZ) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_GetVersion@0 that cannot be parsed by LNK2019, which is referenced in the function "public: static void _ _ cdecl Ogre::FreeImageCodec::startup (void)" (? startup@FreeImageCodec@Ogre@@SAXXZ) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_GetCopyrightMessage@0 that cannot be parsed by LNK2019, which is referenced in the function "public: static void _ _ cdecl Ogre::FreeImageCodec::startup (void)" (? startup@FreeImageCodec@Ogre@@SAXXZ) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_SetOutputMessage@4 that cannot be parsed by LNK2019, which is referenced in the function "public: static void _ _ cdecl Ogre::FreeImageCodec::startup (void)" (? startup@FreeImageCodec@Ogre@@SAXXZ) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_AllocateT@28 that cannot be parsed by LNK2019, which is referenced in the function "private: struct FIBITMAP * _ thiscall Ogre::FreeImageCodec::encodeBitmap (class Ogre::SharedPtr &, class Ogre::SharedPtr &) const" (? encodeBitmap@FreeImageCodec@Ogre@@ABEPAUFIBITMAP@@AAV?$SharedPtr@VMemoryDataStream@Ogre@@@2@AAV?$SharedPtr@VCodecData@Codec@Ogre@@@2@@Z) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_Unload@4 that cannot be parsed by LNK2019 The symbol is referenced in the function "public: virtual struct std::pair _ _ thiscall Ogre::FreeImageCodec::decode (class Ogre::SharedPtr &) const" (? decode@FreeImageCodec@Ogre@@UBE?AU?$pair@V?$SharedPtr@VMemoryDataStream@Ogre@@@Ogre@@V?$SharedPtr@VCodecData@Codec@Ogre@@@2@@std@@AAV?$SharedPtr@VDataStream@Ogre@@@2@@Z) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_Save@16 that cannot be parsed by LNK2019 The symbol is found in the function "public: virtual void _ _ thiscall Ogre::FreeImageCodec::encodeToFile (class Ogre::SharedPtr &, class std::basic_string const & Class Ogre::SharedPtr &) const "(? encodeToFile@FreeImageCodec@Ogre@@UBEXAAV?$SharedPtr@VMemoryDataStream@Ogre@@@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAV?$SharedPtr@VCodecData@Codec@Ogre@@@2@@Z) is referenced by OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_OpenMemory@8 that cannot be parsed by LNK2019 The symbol is referenced in the function "public: virtual struct std::pair _ _ thiscall Ogre::FreeImageCodec::decode (class Ogre::SharedPtr &) const" (? decode@FreeImageCodec@Ogre@@UBE?AU?$pair@V?$SharedPtr@VMemoryDataStream@Ogre@@@Ogre@@V?$SharedPtr@VCodecData@Codec@Ogre@@@2@@std@@AAV?$SharedPtr@VDataStream@Ogre@@@2@@Z) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_CloseMemory@4 that cannot be parsed by LNK2019 The symbol is referenced in the function "public: virtual struct std::pair _ _ thiscall Ogre::FreeImageCodec::decode (class Ogre::SharedPtr &) const" (? decode@FreeImageCodec@Ogre@@UBE?AU?$pair@V?$SharedPtr@VMemoryDataStream@Ogre@@@Ogre@@V?$SharedPtr@VCodecData@Codec@Ogre@@@2@@std@@AAV?$SharedPtr@VDataStream@Ogre@@@2@@Z) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_LoadFromMemory@12 that cannot be parsed by LNK2019 The symbol is referenced in the function "public: virtual struct std::pair _ _ thiscall Ogre::FreeImageCodec::decode (class Ogre::SharedPtr &) const" (? decode@FreeImageCodec@Ogre@@UBE?AU?$pair@V?$SharedPtr@VMemoryDataStream@Ogre@@@Ogre@@V?$SharedPtr@VCodecData@Codec@Ogre@@@2@@std@@AAV?$SharedPtr@VDataStream@Ogre@@@2@@Z) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_SaveToMemory@16 that cannot be parsed by LNK2019 The symbol is referenced in the function "public: virtual class Ogre::SharedPtr _ _ thiscall Ogre::FreeImageCodec::encode (class Ogre::SharedPtr &, class Ogre::SharedPtr &) const" (? encode@FreeImageCodec@Ogre@@UBE?AV?$SharedPtr@VDataStream@Ogre@@@2@AAV?$SharedPtr@VMemoryDataStream@Ogre@@@2@AAV?$SharedPtr@VCodecData@Codec@Ogre@@@2@@Z) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_AcquireMemory@12 that cannot be parsed by LNK2019 The symbol is referenced in the function "public: virtual class Ogre::SharedPtr _ _ thiscall Ogre::FreeImageCodec::encode (class Ogre::SharedPtr &, class Ogre::SharedPtr &) const" (? encode@FreeImageCodec@Ogre@@UBE?AV?$SharedPtr@VDataStream@Ogre@@@2@AAV?$SharedPtr@VMemoryDataStream@Ogre@@@2@AAV?$SharedPtr@VCodecData@Codec@Ogre@@@2@@Z) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_GetFIFCount@0 that cannot be parsed by LNK2019, which is referenced in the function "public: static void _ _ cdecl Ogre::FreeImageCodec::startup (void)" (? startup@FreeImageCodec@Ogre@@SAXXZ) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_GetFormatFromFIF@4 that cannot be parsed by LNK2019, which is referenced in the function "void _ _ cdecl Ogre::FreeImageLoadErrorHandler (enum FREE_IMAGE_FORMAT,char const *)" (? FreeImageLoadErrorHandler@Ogre@@YAXW4FREE_IMAGE_FORMAT@@PBD@Z) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_GetFIFExtensionList@4 that cannot be parsed by LNK2019, which is referenced in the function "public: static void _ _ cdecl Ogre::FreeImageCodec::startup (void)" (? startup@FreeImageCodec@Ogre@@SAXXZ) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_FIFSupportsExportBPP@8 that cannot be parsed by LNK2019, which is referenced in the function "private: struct FIBITMAP * _ thiscall Ogre::FreeImageCodec::encodeBitmap (class Ogre::SharedPtr &, class Ogre::SharedPtr &) const" (? encodeBitmap@FreeImageCodec@Ogre@@ABEPAUFIBITMAP@@AAV?$SharedPtr@VMemoryDataStream@Ogre@@@2@AAV?$SharedPtr@VCodecData@Codec@Ogre@@@2@@Z) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_FIFSupportsExportType@8 that cannot be parsed by LNK2019, which is referenced in the function "private: struct FIBITMAP * _ thiscall Ogre::FreeImageCodec::encodeBitmap (class Ogre::SharedPtr &, class Ogre::SharedPtr &) const" (? encodeBitmap@FreeImageCodec@Ogre@@ABEPAUFIBITMAP@@AAV?$SharedPtr@VMemoryDataStream@Ogre@@@2@AAV?$SharedPtr@VCodecData@Codec@Ogre@@@2@@Z) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_GetFileTypeFromMemory@8 that cannot be parsed by LNK2019, which is referenced in the function "public: virtual class std::basic_string _ thiscall Ogre::FreeImageCodec::magicNumberToFileExt (char const *, unsigned int) const" (? magicNumberToFileExt@FreeImageCodec@Ogre@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PBDI@Z) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_GetImageType@4 that cannot be parsed by LNK2019 The symbol is referenced in the function "public: virtual struct std::pair _ _ thiscall Ogre::FreeImageCodec::decode (class Ogre::SharedPtr &) const" (? decode@FreeImageCodec@Ogre@@UBE?AU?$pair@V?$SharedPtr@VMemoryDataStream@Ogre@@@Ogre@@V?$SharedPtr@VCodecData@Codec@Ogre@@@2@@std@@AAV?$SharedPtr@VDataStream@Ogre@@@2@@Z) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_GetBits@4 that cannot be parsed by LNK2019 The symbol is referenced in the function "public: virtual struct std::pair _ _ thiscall Ogre::FreeImageCodec::decode (class Ogre::SharedPtr &) const" (? decode@FreeImageCodec@Ogre@@UBE?AU?$pair@V?$SharedPtr@VMemoryDataStream@Ogre@@@Ogre@@V?$SharedPtr@VCodecData@Codec@Ogre@@@2@@std@@AAV?$SharedPtr@VDataStream@Ogre@@@2@@Z) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_GetBPP@4 that cannot be parsed by LNK2019 The symbol is referenced in the function "public: virtual struct std::pair _ _ thiscall Ogre::FreeImageCodec::decode (class Ogre::SharedPtr &) const" (? decode@FreeImageCodec@Ogre@@UBE?AU?$pair@V?$SharedPtr@VMemoryDataStream@Ogre@@@Ogre@@V?$SharedPtr@VCodecData@Codec@Ogre@@@2@@std@@AAV?$SharedPtr@VDataStream@Ogre@@@2@@Z) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_GetWidth@4 that cannot be parsed by LNK2019 The symbol is referenced in the function "public: virtual struct std::pair _ _ thiscall Ogre::FreeImageCodec::decode (class Ogre::SharedPtr &) const" (? decode@FreeImageCodec@Ogre@@UBE?AU?$pair@V?$SharedPtr@VMemoryDataStream@Ogre@@@Ogre@@V?$SharedPtr@VCodecData@Codec@Ogre@@@2@@std@@AAV?$SharedPtr@VDataStream@Ogre@@@2@@Z) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_GetHeight@4 that cannot be parsed by LNK2019 The symbol is referenced in the function "public: virtual struct std::pair _ _ thiscall Ogre::FreeImageCodec::decode (class Ogre::SharedPtr &) const" (? decode@FreeImageCodec@Ogre@@UBE?AU?$pair@V?$SharedPtr@VMemoryDataStream@Ogre@@@Ogre@@V?$SharedPtr@VCodecData@Codec@Ogre@@@2@@std@@AAV?$SharedPtr@VDataStream@Ogre@@@2@@Z) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_GetPitch@4 that cannot be parsed by LNK2019 The symbol is referenced in the function "public: virtual struct std::pair _ _ thiscall Ogre::FreeImageCodec::decode (class Ogre::SharedPtr &) const" (? decode@FreeImageCodec@Ogre@@UBE?AU?$pair@V?$SharedPtr@VMemoryDataStream@Ogre@@@Ogre@@V?$SharedPtr@VCodecData@Codec@Ogre@@@2@@std@@AAV?$SharedPtr@VDataStream@Ogre@@@2@@Z) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_GetColorType@4 that cannot be parsed by LNK2019 The symbol is referenced in the function "public: virtual struct std::pair _ _ thiscall Ogre::FreeImageCodec::decode (class Ogre::SharedPtr &) const" (? decode@FreeImageCodec@Ogre@@UBE?AU?$pair@V?$SharedPtr@VMemoryDataStream@Ogre@@@Ogre@@V?$SharedPtr@VCodecData@Codec@Ogre@@@2@@std@@AAV?$SharedPtr@VDataStream@Ogre@@@2@@Z) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_GetGreenMask@4 that cannot be parsed by LNK2019 The symbol is referenced in the function "public: virtual struct std::pair _ _ thiscall Ogre::FreeImageCodec::decode (class Ogre::SharedPtr &) const" (? decode@FreeImageCodec@Ogre@@UBE?AU?$pair@V?$SharedPtr@VMemoryDataStream@Ogre@@@Ogre@@V?$SharedPtr@VCodecData@Codec@Ogre@@@2@@std@@AAV?$SharedPtr@VDataStream@Ogre@@@2@@Z) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_IsTransparent@4 that cannot be parsed by LNK2019 The symbol is referenced in the function "public: virtual struct std::pair _ _ thiscall Ogre::FreeImageCodec::decode (class Ogre::SharedPtr &) const" (? decode@FreeImageCodec@Ogre@@UBE?AU?$pair@V?$SharedPtr@VMemoryDataStream@Ogre@@@Ogre@@V?$SharedPtr@VCodecData@Codec@Ogre@@@2@@std@@AAV?$SharedPtr@VDataStream@Ogre@@@2@@Z) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_ConvertTo24Bits@4 that cannot be parsed by LNK2019 The symbol is referenced in the function "public: virtual struct std::pair _ _ thiscall Ogre::FreeImageCodec::decode (class Ogre::SharedPtr &) const" (? decode@FreeImageCodec@Ogre@@UBE?AU?$pair@V?$SharedPtr@VMemoryDataStream@Ogre@@@Ogre@@V?$SharedPtr@VCodecData@Codec@Ogre@@@2@@std@@AAV?$SharedPtr@VDataStream@Ogre@@@2@@Z) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error external symbol _ _ imp__FreeImage_ConvertTo32Bits@4 that cannot be parsed by LNK2019 The symbol is referenced in the function "public: virtual struct std::pair _ _ thiscall Ogre::FreeImageCodec::decode (class Ogre::SharedPtr &) const" (? decode@FreeImageCodec@Ogre@@UBE?AU?$pair@V?$SharedPtr@VMemoryDataStream@Ogre@@@Ogre@@V?$SharedPtr@VCodecData@Codec@Ogre@@@2@@std@@AAV?$SharedPtr@VDataStream@Ogre@@@2@@Z) OgreMain F:\ AI\ mogre\ .build\ vs2013\ OgreFreeImageCodec.obj 1
Error LNK1120 31 external commands that cannot be parsed OgreMain F:\ AI\ mogre\ bin\ Debug\ x86\ OgreMain_d.dll 1
Unparsed external symbol _ _ imp__FreeImage_Initialise@4 description
_ _ imp__FreeImage_Initialise@4 is the address when the function is compiled into a dynamic library, indicating that there is no address for the function in FreeImage.lib
Call the command to view the function declaration in FreeImage.lib
C:\ Program Files (x86)\ Microsoft Visual Studio 14.0\ VC\ bin > "C:\ Program Files (x86)\ Microsoft Visual Studio 14.0\ VC\ bin\ dumpbin.exe" / SYMBOLS F:\ AI\ FreeImage\ Win32\ Debug\ FreeImaged.lib > D:FreeImageLib.txt
It shows that the compiled FreeImage.lib is a static library, and the address of the function in the static library is as follows: _ _ imp__FreeImage_Initialise, recompile the dynamic library, and link the dynamic library to solve the problem.