LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Problem compiling a programing using SDL under Ubuntu 5.40. (https://www.linuxquestions.org/questions/programming-9/problem-compiling-a-programing-using-sdl-under-ubuntu-5-40-a-426845/)

RHLinuxGUY 03-21-2006 03:08 AM

Problem compiling a programing using SDL under Ubuntu 5.40.
 
I'm getting the SDL/SDL.h: No such file or directory error when compiling my programs...

It worked just fine under my 5.04 Hoary Hedgechog version of Ubuntu, but since my upgrade I'm at a lose.

Here is my make file...

test031206: main.o fight.o gSDL.o
g++ main.o fight.o gSDL.o -Wall `sdl-config --cflags --libs` -lSDL -o test031206
fight.o: fight.cpp headerfiles.h
g++ -c fight.cpp
main.o: main.cpp headerfiles.h
g++ -c main.cpp
gSDL.o: gSDL.cpp headerfiles.h
g++ -c gSDL.cpp

What should I do?

nx5000 03-21-2006 06:52 AM

What gives
Code:

apt-cache policy libsdl1.2-dev

RHLinuxGUY 03-21-2006 09:30 AM

george@George:~$ apt-cache policy libsdl1.2-dev
libsdl1.2-dev:
Installed: (none)
Candidate: (none)
Version table:
W: Couldn't stat source package list http://archive.ubuntu.com breezy/Badger Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_breezy_Badger_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://archive.ubuntu.com breezy/Badger-updates Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_breezy_Badger-updates_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://archive.ubuntu.com breezy/main Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_breezy_main_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://archive.ubuntu.com breezy/restricted Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_breezy_restricted_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://archive.ubuntu.com breezy/universe Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_breezy_universe_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://archive.ubuntu.com breezy/multiverse Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_breezy_multiverse_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://archive.ubuntu.com breezy/Badger Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_breezy_Badger_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://archive.ubuntu.com breezy/universe Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_breezy_universe_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://archive.ubuntu.com breezy/main Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_breezy_main_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://archive.ubuntu.com breezy/restricted Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_breezy_restricted_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://archive.ubuntu.com breezy/multiverse Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_breezy_multiverse_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://security.ubuntu.com breezy/Badger-security Packages (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_breezy_Badger-security_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://security.ubuntu.com breezy/universe Packages (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_breezy_universe_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://security.ubuntu.com breezy/main Packages (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_breezy_main_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://security.ubuntu.com breezy/restricted Packages (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_breezy_restricted_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://security.ubuntu.com breezy/multiverse Packages (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_breezy_multiverse_binary-i386_Packages) - stat (2 No such file or directory)
george@George:~$

nx5000 03-21-2006 10:12 AM

I think you have a wrong /etc/apt/sources.list. Or you have a good one but have not run
Code:

apt-get clean
apt-get update

Candidate: none
ouch

You first have to resolve this problem then

apt-get install libsdl1.2-dev

RHLinuxGUY 03-22-2006 08:03 AM

I believe I got my repositories corrected, I'll update this thread once I get my problem eradicated.

RHLinuxGUY 03-24-2006 08:55 PM

It works now, np's. Just needed to fix my repositories and install libsdl-dev.


All times are GMT -5. The time now is 04:59 PM.