[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: |
Volker Grabsch |
Subject: |
Re: [Mingw-cross-env-list] Link errors in SDL/Qt project |
Date: |
Fri, 16 Apr 2010 14:30:11 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Nikos Chantziaras <address@hidden> schrieb:
> >>TEMPLATE = app
> >>CONFIG += qt release
> >>LIBS += -lSDL -lSDL_mixer
>
> 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
You can find out all needed options via:
i686-pc-mingw32-pkg-config --libs sdl
i686-pc-mingw32-pkg-config --libs SDL_mixer
You can also combine these commands:
i686-pc-mingw32-pkg-config --libs sdl SDL_mixer
If there's any dependency missing in those command outputs, please
report this to us. It would be a bug that has to be fixed in
mingw-cross-env.
I don't know whether you can incorporate that command via shell
backticks into your *.pro file:
LIBS += -lSDL -lSDL_mixer
win32 {
LIBS += `i686-pc-mingw32-pkg-config --libs sdl SDL_mixer`
}
If that doesn't work, I suggest to mention those flags explicitly:
LIBS += -lSDL -lSDL_mixer
win32 {
LIBS += -lmikmod -lpthread -lws2_32 ...
}
Note, however, that the exact list of required libraries might change
in future versions. For instance, we could decide to build SDL without
pthreads. Or we could support another sound library in SDL_mixer. So
if anything fails, don't forget to compare your list of libraries with
the outputs of:
i686-pc-mingw32-pkg-config --libs sdl
i686-pc-mingw32-pkg-config --libs SDL_mixer
i686-pc-mingw32-pkg-config --libs ...
> 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)
This seems to be a pthread problem with SDL oder SDL_mixer. Please have
a look at:
http://lists.gnu.org/archive/html/mingw-cross-env-list/2010-04/msg00053.html
http://lists.gnu.org/archive/html/mingw-cross-env-list/2010-04/msg00054.html
It would be great if you could try the advices I gave there. The
original poster didn't respond yet.
Alternatively, you could try to fix the pthread library. For technical
reasons, it is built as part of the GCC build, in src/gcc.mk, lines 62-71.
The idea was to use pthreads to support OpenMP, but that doesn't really
work and noone had yet found the time to fix it.
Any investigation on that topic is greatly appreciated.
Greets,
Volker
--
Volker Grabsch
---<<(())>>---
Administrator
NotJustHosting GbR