I'm trying to build a Qt application that uses SDL with the
development version of mingw-cross-env (fetches a few minutes ago). It
builds fine in Linux. The project file has these entries:
TEMPLATE = app
CONFIG += qt release
LIBS += -lSDL -lSDL_mixer
Builds fine with native Linux GCC/Qt/SDL, but barks out with
"undefined symbol" errors at the link step with mingw-cross. The link
command that is generated is:
i686-pc-mingw32-g++ -enable-stdcall-fixup -Wl,-enable-auto-import
-Wl,-enable-runtime-pseudo-reloc -Wl,-s -Wl,-subsystem,windows
-mthreads -Wl -o release/QTads.exe object_script.QTads.Release
-L"/home/realnc/opt/mingw/usr/i686-pc-mingw32/lib" -lmingw32 -lqtmain
-lSDL -lSDL_mixer -lQtGui -lgdi32 -lcomdlg32 -loleaut32 -limm32
-lwinmm -lwinspool -lmsimg32 -lQtCore -lpng -lkernel32 -luser32
-lshell32 -luuid -lole32 -ladvapi32 -lws2_32 -lz
I am attaching the errors to this email.
...
/home/realnc/opt/mingw/usr/i686-pc-mingw32/lib/libqtmain.a(qtmain_win.o):qtmain_win.cpp:(.text+0x1a2):
undefined reference to `qMain(int, char**)'
/home/realnc/opt/mingw/usr/i686-pc-mingw32/lib/libSDL.a(SDL_dx5video.o):
In function `DX5_Available':
/home/realnc/opt/mingw/tmp-sdl/SDL-1.2.14/./src/video/windx5/SDL_dx5video.c:495:
undefined reference to `_IID_IDirectDrawSurface3'
I suspect libdxguid.a provides those symbols. Could you try adding
-ldxguid to you LIBS or directly to the i686-pc-mingw32-g++ call above?