SDL_net Trouble

I have been learning SDL and am just working with the basics right now. I have used 2 Add-on libraries so far: SDL_image and SDL_ttf. I am running Ubuntu Intrepid Linux and the gcc compiler. I was able to download the source of both SDL_image and SDL_ttf and then simply untar, ./configure, and make both of these libraries and then in my code include them with “SDL_image.h” and “SDL_ttf.h”.

When compiling my code I have been using: "g++ sdl-config --cflags --libs filename.cpp"
For code using add-on libraries I have been using: “g++ sdl-config --cflags --libs -lSDL_ filename.cpp”

Just as I had done with the first two add-on libraries I downloaded SDL_net, untar, ./configure, make. This all seems to go fine but I can not use SDL_net and #include “SDL_net.h” gives me: error: SDL_net.h: No such file or directory.

I notice that in ‘/usr/include/SDL’ I see both SDL_image.h and SDL_ttf.h but no SDL_net.h

When I do a locate on SDL_image I get:

Code:

/usr/include/SDL/SDL_image.h
/usr/lib/libSDL_image-1.2.so.0
/usr/lib/libSDL_image-1.2.so.0.1.5
/usr/lib/libSDL_image.a
/usr/lib/libSDL_image.la
/usr/lib/libSDL_image.so

When I do a locate on SDL_ttf I get:

Code:

/usr/include/SDL/SDL_ttf.h
/usr/lib/libSDL_ttf-2.0.so.0
/usr/lib/libSDL_ttf-2.0.so.0.6.3
/usr/lib/libSDL_ttf.a
/usr/lib/libSDL_ttf.la
/usr/lib/libSDL_ttf.so
/usr/lib32/libSDL_ttf-2.0.so.0
/usr/lib32/libSDL_ttf-2.0.so.0.6.3

But locate on SDL_net gives me only:

Code:

/usr/lib32/libSDL_net-1.2.so.0
/usr/lib32/libSDL_net-1.2.so.0.0.7

Am I doing something wrong? did something go wrong with the install? Can I just put the files in the necessary locations manually(which files are needed and where do they go?)?

Any help is appreciated.[/code]------------------------
~Corbin
IAmCorbin.net

You need to install the development libraries for SDL_net, specifically the SDL_net*-dev package.

I downloaded SDL_net right from http://www.libsdl.org/projects/SDL_net/ - SDL_net-1.2.7.tar.gz

I don’t see a dev package there and I didn’t need to do this for SDL_ttf or SDL_image so what is different about SDL_net? My understanding of development packages is that they are for developing to software to which it refers eg…Wouldn’t I only need the dev package if I was developing SDL_net itself?------------------------
~Corbin
IAmCorbin.net

You need the development packages if you want to develop with the libraries. Of course, compiling the source yourself with ./configure etc. does the job the development packages usually do to simplify it. :slight_smile:

Open synaptic package manager or aquivalent if you are not using GNOME, select the package libsdl-net1.2-dev and install it or alternatively go to the terminal and type “sudo apt-get install libsdl-net1.2-dev” and press Enter. The Ubuntu packages are usually quiet up-to-date, not bleeding edge, but should work fine.

If SDL_net.h is all you’re missing, then just copy it from your source
package. Something like:
$ sudo cp SDL_net.h /usr/include/SDL

You’re on Ubuntu, so you could have used apt to grab binary packages instead:
$ sudo apt-get install libsdl-net1.2 libsdl-net1.2-dev

The first package is the runtime library. The second (the 'dev’
package) has the development library (libSDL_net.a and SDL_net.h).
You need that to compile and link your program with SDL_net.

Jonny DOn Fri, Nov 20, 2009 at 6:50 PM, IAmCorbin wrote:

I downloaded SDL_net right from http://www.libsdl.org/projects/SDL_net/ -
SDL_net-1.2.7.tar.gz

I don’t see a dev package there and I didn’t need to do this for SDL_ttf or
SDL_image so what is different about SDL_net? My understanding of
development packages is that they are for developing to software to which it
refers eg…Wouldn’t I only need the dev package if I was developing SDL_net
itself?


~Corbin
IAmCorbin.net


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