LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-21-2006, 03:08 AM   #1
RHLinuxGUY
Member
 
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889
Blog Entries: 1

Rep: Reputation: 30
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?
 
Old 03-21-2006, 06:52 AM   #2
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 55
What gives
Code:
apt-cache policy libsdl1.2-dev
 
Old 03-21-2006, 09:30 AM   #3
RHLinuxGUY
Member
 
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889
Blog Entries: 1

Original Poster
Rep: Reputation: 30
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:~$
 
Old 03-21-2006, 10:12 AM   #4
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 55
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
 
Old 03-22-2006, 08:03 AM   #5
RHLinuxGUY
Member
 
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889
Blog Entries: 1

Original Poster
Rep: Reputation: 30
I believe I got my repositories corrected, I'll update this thread once I get my problem eradicated.
 
Old 03-24-2006, 08:55 PM   #6
RHLinuxGUY
Member
 
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889
Blog Entries: 1

Original Poster
Rep: Reputation: 30
It works now, np's. Just needed to fix my repositories and install libsdl-dev.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sourcecompiling Problem...The sdl-config script installed by SDL could not be found. deepclutch Debian 1 12-15-2005 12:15 PM
Problem compiling SDL-Programm Cornholio Programming 2 03-07-2005 10:57 AM
SDL compiling problem kubaj Programming 2 10-27-2004 11:15 AM
SDL Compiling Help slackwarefan Linux - Software 1 02-18-2004 04:41 PM
SDL Error While Compiling... Chryzmo Linux - Newbie 1 09-01-2003 12:20 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration