cegui freeimage linking fails with mingw

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

ali1234
Just popping in
Just popping in
Posts: 1
Joined: Mon Mar 25, 2013 14:08

cegui freeimage linking fails with mingw

Postby ali1234 » Mon Mar 25, 2013 14:50

When cross building for win32 using mingw linking fails with undefined references. Even though libfreeimage.a is linked, and even though this library worked perfectly fine for building ogre:

Code: Select all

/usr/bin/i686-w64-mingw32-g++     -shared -o ../../../../bin/libCEGUIFreeImageImageCodec.dll -Wl,--out-implib,../../../../lib/libCEGUIFreeImageImageCodec.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -Wl,--whole-archive CMakeFiles/CEGUIFreeImageImageCodec.dir/objects.a -Wl,--no-whole-archive /home/al/Raceworld/raceworld/win32/sdk/out/lib/libfreeimage.a ../../../../lib/libCEGUIBase.dll.a -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
CMakeFiles/CEGUIFreeImageImageCodec.dir/objects.a(ImageCodec.cpp.obj):ImageCodec.cpp:(.text+0x41): undefined reference to `__imp__FreeImage_DeInitialise@0'
CMakeFiles/CEGUIFreeImageImageCodec.dir/objects.a(ImageCodec.cpp.obj):ImageCodec.cpp:(.text+0x12e): undefined reference to `__imp__FreeImage_GetFormatFromFIF@4'
CMakeFiles/CEGUIFreeImageImageCodec.dir/objects.a(ImageCodec.cpp.obj):ImageCodec.cpp:(.text+0x4eb): undefined reference to `__imp__FreeImage_OpenMemory@8'
CMakeFiles/CEGUIFreeImageImageCodec.dir/objects.a(ImageCodec.cpp.obj):ImageCodec.cpp:(.text+0x51f): undefined reference to `__imp__FreeImage_GetFileTypeFromMemory@8'
CMakeFiles/CEGUIFreeImageImageCodec.dir/objects.a(ImageCodec.cpp.obj):ImageCodec.cpp:(.text+0x550): undefined reference to `__imp__FreeImage_LoadFromMemory@12'
CMakeFiles/CEGUIFreeImageImageCodec.dir/objects.a(ImageCodec.cpp.obj):ImageCodec.cpp:(.text+0x580): undefined reference to `__imp__FreeImage_ConvertTo32Bits@4'
CMakeFiles/CEGUIFreeImageImageCodec.dir/objects.a(ImageCodec.cpp.obj):ImageCodec.cpp:(.text+0x5aa): undefined reference to `__imp__FreeImage_Unload@4'
CMakeFiles/CEGUIFreeImageImageCodec.dir/objects.a(ImageCodec.cpp.obj):ImageCodec.cpp:(.text+0x5c6): undefined reference to `__imp__FreeImage_GetPitch@4'
CMakeFiles/CEGUIFreeImageImageCodec.dir/objects.a(ImageCodec.cpp.obj):ImageCodec.cpp:(.text+0x5e8): undefined reference to `__imp__FreeImage_GetHeight@4'
CMakeFiles/CEGUIFreeImageImageCodec.dir/objects.a(ImageCodec.cpp.obj):ImageCodec.cpp:(.text+0x60a): undefined reference to `__imp__FreeImage_GetWidth@4'
CMakeFiles/CEGUIFreeImageImageCodec.dir/objects.a(ImageCodec.cpp.obj):ImageCodec.cpp:(.text+0x68a): undefined reference to `__imp__FreeImage_ConvertToRawBits@32'
CMakeFiles/CEGUIFreeImageImageCodec.dir/objects.a(ImageCodec.cpp.obj):ImageCodec.cpp:(.text+0x712): undefined reference to `__imp__FreeImage_Unload@4'
CMakeFiles/CEGUIFreeImageImageCodec.dir/objects.a(ImageCodec.cpp.obj):ImageCodec.cpp:(.text+0x7bc): undefined reference to `__imp__FreeImage_CloseMemory@4'
CMakeFiles/CEGUIFreeImageImageCodec.dir/objects.a(ImageCodec.cpp.obj):ImageCodec.cpp:(.text+0x7fc): undefined reference to `__imp__FreeImage_LoadFromMemory@12'
CMakeFiles/CEGUIFreeImageImageCodec.dir/objects.a(ImageCodec.cpp.obj):ImageCodec.cpp:(.text+0x836): undefined reference to `__imp__FreeImage_LoadFromMemory@12'
CMakeFiles/CEGUIFreeImageImageCodec.dir/objects.a(ImageCodec.cpp.obj):ImageCodec.cpp:(.text+0xfad): undefined reference to `__imp__FreeImage_Unload@4'
CMakeFiles/CEGUIFreeImageImageCodec.dir/objects.a(ImageCodec.cpp.obj):ImageCodec.cpp:(.text+0x1133): undefined reference to `__imp__FreeImage_Initialise@4'
CMakeFiles/CEGUIFreeImageImageCodec.dir/objects.a(ImageCodec.cpp.obj):ImageCodec.cpp:(.text+0x1143): undefined reference to `__imp__FreeImage_SetOutputMessage@4'
CMakeFiles/CEGUIFreeImageImageCodec.dir/objects.a(ImageCodec.cpp.obj):ImageCodec.cpp:(.text+0x1149): undefined reference to `__imp__FreeImage_GetFIFCount@0'
CMakeFiles/CEGUIFreeImageImageCodec.dir/objects.a(ImageCodec.cpp.obj):ImageCodec.cpp:(.text+0x1191): undefined reference to `__imp__FreeImage_GetFIFExtensionList@4'
/usr/bin/i686-w64-mingw32-ld: CMakeFiles/CEGUIFreeImageImageCodec.dir/objects.a(ImageCodec.cpp.obj): bad reloc address 0x2 in section `.text$_ZN5CEGUI16GenericExceptionD1Ev[CEGUI::GenericException::~GenericException()]'
collect2: ld returned 1 exit status


Full verbose build log (warning, huge): http://paste.ubuntu.com/5646528/

Return to “Help”

Who is online

Users browsing this forum: No registered users and 12 guests