[SDL] Linux MinGW linking

Cournia Nathan A nathan at cs.clemson.edu
Sun Aug 4 15:40:00 PDT 2002


I'm getting closer.  This is what I've done so far.

1. Followed the directions at:
http://www.libsdl.org/extras/win32/cross/README.txt

2. Installed: http://www.libsdl.org/release/SDL-devel-1.2.4-mingw32.tar.gz

3. Installed the following:
http://www.newimage.com/~rhk/crossgcc/zlib-1.1.3-cross-bin.tar.gz
http://www.newimage.com/~rhk/crossgcc/libpng-1.0.8-cross-bin.tar.gz
http://www.newimage.com/~rhk/crossgcc/jpeg-6b-cross-bin.tar.gz

4. Compiled freetype 2.1.2.

5. Compiled SDL_ttf 2.0.5

Which brings me to my current problem.  Again, I'm having linking
problems:

g++ particle.o fling.o ../cmds.o ../tremor.o ../fps.o ../console.o
../font.o ../gl_draw.o ../image.o ../shell.o ../timer.o ../vector.o
../video.o  `sdl-config --libs` -lopengl32 -lglu32 -lSDL_ttf -o fling
/usr/local/cross-tools/i386-mingw32msvc/lib/libmingwex.a(snprintf.o)(.text+0x20):snprintf.c:
multiple definition of `vsnprintf'
fling.o(.text$vsnprintf+0x0):/tmp/cross/cross2/include/g++-v3/bits/stl_alloc.h:
first defined here
/usr/local/cross-tools/i386-mingw32msvc/lib/libSDLmain.a(SDL_main.o.b): In
function `console_main':
/home/hercules/release/SDL-1.2.4/src/main/SDL_main.c:230: undefined
reference to `SDL_main'
make: *** [fling] Error 1

The problems seem to be with vsnprintf and SDL_main.

sdl-config produces the following:

-L/usr/local/cross-tools/i386-mingw32msvc/lib -lmingw32 -lSDLmain -lSDL
-mwindows

Any ideas on how to fix this?  Thanks.

nathan

On Sun, 4 Aug 2002, Johannes Schmidt wrote:

> On Sunday 04 August 2002 06:29, Cournia Nathan A wrote:
> [snip]
> > I've successfully built and installed the MinGW environment.  However,
> > when trying to compile my application I get the following linking errors:
> >
> > g++ particle.o fling.o ../cmds.o ../tremor.o ../fps.o ../console.o
> > ../font.o ../gl_draw.o ../image.o ../shell.o ../timer.o ../vector.o
> > ../video.o  `sdl-config --libs`  -L/usr/lib -L/usr/X11R6/lib -lGLU -lGL
> > -lSDL_ttf -o fling
> >
> > /tmp/cross/cross2//lib/gcc-lib/i386-mingw32msvc/3.1/../../../../
> > i386-mingw32msvc/bin/ld:
> > cannot find -lGLU
>
> The OpenGL libraries for Windows are called opengl32.dll and glu32.dll.
>
> Try something like "-lopengl32 -lglu32".
>
>
> --
> Johannes Schmidt
>
> < http://libufo.sourceforge.net > Your widget set for OpenGL
>
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
>





More information about the SDL mailing list