i want to compile a small test-application with MinGW under Windows (it’s
compiling finde under Linux).
It uses SDL and SDL_mixer.
I’ve installed MinGW, SDL-Develop for MinGW and SDL_Mixer-Develop.
I don’t get it: The paths’ are correct, all Headers and libs
are in the directories…
I’m not 100% sure why, but in some cases changing the order (yes,
the order) of the libraries passed to the linker help fix weird
things like these. Try, for example,
As Gabriel wrote, you must put sdltest.o before the libraries list,
otherwise the linker doesn’t know that SDL functions are needed when it
"reads" libSDL.a and thus doesn’t include them. GCC’s linker "reads"
link libs and objects from left to right… It won’t include function
if it doesn’t know that they are needed.
A “-Dmain=SDLmain” might be helpful too; I know it’s here in my DEVC++
projects.On 23/03/2004, Tino Miegel, you wrote:
–
Please remove “.ARGL.invalid” from my email when replying.
Incoming HTML mails are automatically deleted.
I don’t get it: The paths’ are correct, all Headers and libs
are in the directories…
I’m not 100% sure why, but in some cases changing the order (yes,
the order) of the libraries passed to the linker help fix weird
things like these. Try, for example,
In some cases, putting SDLmain ahead of SDL makes it works. Also make
sure that you are not using <SDL/SDL.h>, but “SDL.h” instead. This is
much more portable.