Link errors with mingw32 on Win98 - SOLVED

The Windows version of SDL was compiled under Linux using
a cross-compiler
http://www.libsdl.org/Xminw32/ so you can use configure,
since mingw32 lacks a
good damn bash !

I see, that makes sense, thanks. :slight_smile:

Anyway, try something like that :
“gcc -o yourexe -mwindows
yourobjectfiles.o -lmingw32 -lSDLmain -lSDL -luser32
-lgdi32 -lwinmm -ldxguid”

I had to add -I…/include/SDL, and I told it the C
source file rather than the object file, but that works. In
fact, I can drop user32, gdi32, winmm and dxguid and it
still works.

It’s surely a problem of library precedence, you have to
put -lmingw32 -lSDLmain -lSDL in that order.

What it appears to be, is the positioning of the source
file I’m compiling in the argument list. For example:

gcc -I…/include/SDL -o a.exe -mwindows sdltest.c -lmingw32
-lSDLmain -lSDL

…works fine, but:

gcc -I…/include/SDL -o a.exe -mwindows -lmingw32 -lSDLmain
-lSDL sdltest.c

…fails, with the linker error I mentioned in an earlier
message.

Thank you very much for solving the problem. :slight_smile:

Another question, is where do I find the
opengl32.lib/glu32.lib and associated includes for mingw32

  • I’ve looked around the SDL website but I can’t find any
    mention of a location to grab them from.

Thanks again.

Thank you very much for solving the problem. :slight_smile:

You’re welcome :wink:

Another question, is where do I find the
opengl32.lib/glu32.lib and associated includes for mingw32

libopengl32.a and libglu32.a are included in mingw32 but strangely
not the include files !
Take a look at http://www.libsdl.org/Xmingw32 and grab
http://www.libsdl.org/Xmingw32/opengl-cross.tar.gz

  • I’ve looked around the SDL website but I can’t find any
    mention of a location to grab them from.

Thanks again.

Herve

----- Original Message -----
From: kinetik@paradise.net.nz ()
To:
Sent: Saturday, June 10, 2000 12:39 PM
Subject: Re: [SDL] Link errors with mingw32 on Win98 - SOLVED