[AD] Static linking requires libstdc++ with mingw?

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Using mingw, I get errors like this:

gcc.exe -W -Wall -g -DDEBUGMODE=1 "CMakeFiles/ex_bitmap.dir/ex_bitmap.c.obj"
    -o ex_bitmap.exe -Wl,--out-implib,libex_bitmap.dll.a
   -Wl,--major-image-version,0,--minor-image-version,0
   ../lib/liba5_iio-debug-static-4.9.8.a
   ../lib/liballegro-debug-static-4.9.8.a
   -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lole32 -ldxguid -lwinmm -lpsapi
   /C/MinGW/lib/libd3d9.a /C/MinGW/lib/libdinput8.a
   -lopengl32 -lglu32 /C/MinGW/lib/libpng.dll.a /C/MinGW/lib/libz.dll.a 
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized
../lib/liballegro-debug-static-4.9.8.a(d3d_disp.cpp.obj):d3d_disp.cpp:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
../lib/liballegro-debug-static-4.9.8.a(d3d_bmp.cpp.obj):d3d_bmp.cpp:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status

Does anyone else get the same?

Adding -lstdc++ fixes the problem for me, so we could simply add that to
the examples when using the static build in Windows.

But apparently my DirectX libraries are a bit broken (as hinted to by
those 4 warnings). So do we logically have to add -lstdc++ if the static
library sources are C++ (d3d_disp.cpp and d3d_bmp.cpp), or should I try
finding a better set of DX libraries for mingw? Or something else?

-- 
Elias Pschernig <elias@xxxxxxxxxx>





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/