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
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
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.
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 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?