Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 07-21-2005, 06:56 PM   #1 (permalink)
slashdot
Registered User
 
Join Date: Dec 2004
Posts: 43
slashdot is on a distinguished road
SDL.h: No such file or directory... problem.

When I try to compile my SDL program... I get this error

SDL.h: No such file or directory

I have included the #include "SDL.h" and should be fine, but I get that error.

After browsing around I realized I needed to install the development packages of SDL... I did to no prevail. I added paths from different directories... what do I do?

By the way I use GNU/Linux Slackware 10. SDL 1.2 compiled from source, then installed by rpm. (using rpm2tgz)
slashdot is offline   Reply With Quote
Old 07-21-2005, 10:54 PM   #2 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,696
redhead is on a distinguished road
shouldn't it be:
Code:
#include <SDL.h>
Since I take it you didn't provide the SDL.h within the source directory you're working in.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Old 07-22-2005, 06:09 AM   #3 (permalink)
slashdot
Registered User
 
Join Date: Dec 2004
Posts: 43
slashdot is on a distinguished road
really? The tutorials I have read on SDL, they always show #include "SDL.h"... is that for C or C++?
slashdot is offline   Reply With Quote
Old 07-22-2005, 09:51 AM   #4 (permalink)
nimaj
Registered User
 
Join Date: Jan 2004
Location: Poughkeepsie, NY
Posts: 18
nimaj is on a distinguished road
Send a message via AIM to nimaj Send a message via Yahoo to nimaj
You would only use quotation marks around a the filename if the header file is in that directory. (AFAIK)
nimaj is offline   Reply With Quote
Old 07-22-2005, 10:45 AM   #5 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,696
redhead is on a distinguished road
The quotation marks are for files currently available, which means in the same directory as the file including it.
When usign <>, you are refering to a system available file in the compilers include library, it dosn't matter where the file including it is placed, the compiler/linker knows where to find it, because it's library routine knows where to find it.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Old 07-22-2005, 11:57 AM   #6 (permalink)
slashdot
Registered User
 
Join Date: Dec 2004
Posts: 43
slashdot is on a distinguished road
Strange the information I got off this site shows it have "".

http://andrew.textux.com/tutorials/tut1/tutorial1.html
slashdot is offline   Reply With Quote
Old 07-22-2005, 12:06 PM   #7 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,696
redhead is on a distinguished road
I find nowhere on that site, where it uses quotes, and the example1 clearly states it to be a system included.
Code:
/*****************************************************
 SDL Tutorial - Example 1
 Andrew M. <andrew@textux.com>
*****************************************************/

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include <SDL.h>
...
So I see no other way than that...
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Old 07-22-2005, 12:44 PM   #8 (permalink)
slashdot
Registered User
 
Join Date: Dec 2004
Posts: 43
slashdot is on a distinguished road
oops wrong site. Whatever I believe you.
slashdot is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Output problem with file manipulation (newbie) crazyant Java 4 03-11-2005 01:03 PM


All times are GMT -8. The time now is 11:33 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting