Help compiling a program using 1.3 from SVN

Hello I want to try opengl 3.0 and i read that SDL 1.3 is supporting it so I
downloaded the latests version from SVN and built it without problems.

Now in a existing project that i have I’m trying to build it with the new
1.3 lib version but i get those errors:

g++ -lSDLmain -lSDL -lGL -lGLU -o dist/Debug/GNU-Linux-x86/opengl3
build/Debug/GNU-Linux-x86/welcome.o
/usr/local/lib/libSDL.so: undefined reference to nativeClear32' /usr/local/lib/libSDL.so: undefined reference tonativeTestThenSet32’

I’m doing something wrong? Maybe the options are wrong?

Thank you and sorry for my poor english.

There may be something else with 1.3, but what happens when you do this:
g++ -o dist/Debug/GNU-Linux-x86/opengl3 build/Debug/GNU-Linux-x86/welcome.o
-lSDLmain -lSDL -lGL -lGLU
by putting the linker parts at the end?On Mon, Aug 10, 2009 at 12:45 PM, Daniel Guzm?n <daniel.guzman85 at gmail.com>wrote:

Hello I want to try opengl 3.0 and i read that SDL 1.3 is supporting it so
I downloaded the latests version from SVN and built it without problems.

Now in a existing project that i have I’m trying to build it with the new
1.3 lib version but i get those errors:

g++ -lSDLmain -lSDL -lGL -lGLU -o dist/Debug/GNU-Linux-x86/opengl3
build/Debug/GNU-Linux-x86/welcome.o
/usr/local/lib/libSDL.so: undefined reference to nativeClear32' /usr/local/lib/libSDL.so: undefined reference tonativeTestThenSet32’

I’m doing something wrong? Maybe the options are wrong?

Thank you and sorry for my poor english.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

There may be something else with 1.3, but what happens when you do this:
g++? -o dist/Debug/GNU-Linux-x86/opengl3 build/Debug/GNU-Linux-x86/welcome.o
-lSDLmain -lSDL -lGL -lGLU
by putting the linker parts at the end?

Hello I want to try opengl 3.0 and i read that SDL 1.3 is supporting it so
I downloaded the latests version from SVN and built it without problems.

Now in a existing project that i have I’m trying to build it with the new
1.3 lib version but i get those errors:

g++??? -lSDLmain -lSDL -lGL -lGLU -o dist/Debug/GNU-Linux-x86/opengl3
build/Debug/GNU-Linux-x86/welcome.o
/usr/local/lib/libSDL.so: undefined reference to nativeClear32' /usr/local/lib/libSDL.so: undefined reference tonativeTestThenSet32’

This is a problem with the SDL_atomic.c code which I am currently
working on. Please tell me which OS and which version of g++ you are
using.

Bob PendletonOn Tue, Aug 11, 2009 at 11:38 PM, Jonathan Greig wrote:

On Mon, Aug 10, 2009 at 12:45 PM, Daniel Guzm?n <daniel.guzman85 at gmail.com> wrote:

I’m doing something wrong? Maybe the options are wrong?

Thank you and sorry for my poor english.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


±----------------------------------------------------------

What I generally do is compile SDL like this:
./autogen.sh
./configure --prefix=$HOME/sdl-1.3
make all
make install

then rename everything it installs to ~/sdl-1.3 like so:
bin/sdl-config becomes bin/sdl-1.3-config
include/SDL becomes include/SDL-1.3
lib/libSDL.a becomes lib/libSDL-1.3.a
etc.
basically, just add -1.3 where appropriate.

then edit sdl-1.3-config, any .la or .m4 files and pkg-config stuff to
refer to the new names and /usr instead of ~/sdl-1.3

then, when I want to compile with SDL 1.3 instead of 1.2 I use

gcc -oprogram program.c pkg-config sdl-1.3 --cflags --libs

or similar.

of course you actually need to copy it to /usr too, using sudo.