|
From: | Mark Brand |
Subject: | Re: [Mingw-cross-env-list] Link errors in SDL/Qt project |
Date: | Fri, 16 Apr 2010 09:48:06 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.2pre) Gecko/20100308 SUSE/3.1b1-6.3 Thunderbird/3.1b1 |
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_mixerBuilds 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 -lzI 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?
regards, Mark
[Prev in Thread] | Current Thread | [Next in Thread] |