[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] Link errors in SDL/Qt project

From: Nikos Chantziaras
Subject: Re: [Mingw-cross-env-list] Link errors in SDL/Qt project
Date: Fri, 16 Apr 2010 11:44:47 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100410 Thunderbird/3.0.4

On 04/16/2010 10:48 AM, Mark Brand wrote:

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:

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.
undefined reference to `qMain(int, char**)'
In function `DX5_Available':
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?

I found out there's a whole set of extra stuff needed. I had to add all the below:

-lmikmod -lpthread -lsmpeg -lwsock32 -ldxguid -lvorbisfile -lvorbis -logg

The application links, but doesn't run in Windows (exits immediately when double clicking). In Wine, it hangs indefinitely with:

err:ntdll:RtlpWaitForCriticalSection section 0x11ad510 "?" wait timed out in thread 0009, blocked by 0000, retrying (60 sec)


But I guess this is an SDL problem, not mingw's fault.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]