Menu

OpenGL Examples not linking

Help
2003-08-14
2003-08-29
  • - 2003-08-14

    I'm using Win2k Pro, Mingw & MSYS, SDL v1.2.5, SDL_Image 1.2.3 and SDL_Console 2.0.  I've built SDL and related libraries from source, and I'm trying to get the examples to work.  After tweaking with the Makefile to make up for some shortcomings of MSYS (`` command quotes don't work, so I had to put the output of sdl-config --libs and sdl-config --cflags in by hand).  I also commented out the snprintf() that was in the split.h and split.c files, as Mingw provides one.  Anyway, at first I was able to get the non-openGL examples to work, but now things seem to not want to link at all.

    Here's some output from make:
    make[1]: Leaving directory `/e/mingw/sdlconsole-2.0'
    gcc ConsoleExample.o split.o -Wall -g -O2  -I/usr/local/include/SDL -I/usr/local/include -Dmain=SDL_main -I../ -I. -L.. -L/usr/local/lib -lmingw32 -lSDLmain -lSDL -mwindows -lm -lSDL_console -lSDL_image -o ConsoleExample.exe
    ../libSDL_console.a(CON_console.o)(.text+0x484): In function `CON_AlphaGL':
    e:/mingw/sdlconsole-2.0/CON_console.c:213: undefined reference to `SDL_LockSurface'

    Repeat ad nauseum for every SDL-related call.

    My libraries are in /usr/local/lib, include files in /usr/local/include and /usr/local/include/SDL.  MSYS aliases /usr to e:\mingw\msys\1.0, and makes unix-style slashes work, in addition to providing a posix-style shell to windoze.

    This is quite frustrating.  I'd love to use this deceivingly powerful library, but some hitches seem to be preventing me from using it the way I intend, with OpenGL.

    Thanks for any insight.

    Kagenin

     
    • Clemens Wacha

      Clemens Wacha - 2003-08-29

      Use sdlconsole 2.1 instead. It uses automake.

      As I can see from your error output it's not really a problem of the console. It says undefined reference to SDL_Locksurface which is a function in SDL.

      But try version 2.1 first and send me an email directly if you still have problems

       

Log in to post a comment.