Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


SDL.h: no such directory found


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
10 replies to this topic

#1 GTEntertainment   Members   -  Reputation: 475

Like
0Likes
Like

Posted 29 June 2014 - 01:03 PM

I set up SDL on my compuer with Code Blocks. But There was an error that said: "fatal error: SDL.h: No such file or directory"

 

Here an image of the error: http://i.imgur.com/4fvBNFw.png

 http://i.imgur.com/aPGmZT2.png

http://i.imgur.com/xkJLco5.png

http://imgur.com/aPGmZT2,xkJLco5,kEgaRqg#2


Edited by GearTreeEntertainment, 29 June 2014 - 01:07 PM.

I'm da almighty Gear


Sponsor:

#2 fastcall22   Crossbones+   -  Reputation: 4870

Like
3Likes
Like

Posted 29 June 2014 - 01:34 PM

Quickfix:
#include "SDL/SDL.h"

Double check your directories; you've a search directory, "C:\Users\sarmeanu\DOCS\SDL\include\", but SDL.h is located at "C:\Users\sarmeanu\DOCS\SDL\include\SDL\SDL.h".

Edited by fastcall22, 29 June 2014 - 01:35 PM.

QWxsIHRvYXN0LXRvYXN0aW5nIHRvYXN0ZXJzIGNhbiB0b2FzdCB0b2FzdGVkIHRvYXN0LCBhbHRob3Vn aCByZS10b2FzdGluZyB0b2FzdGVkIHRvYXN0IGlzIGdlbmVyYWxseSBub3QgcmVjb21tZW5kZWQgYnkg dGhlIG1hbnVmYWN0dXJlcnMgb2YgdG9hc3QtdG9hc3RpbmcgdG9hc3RlcnMuLi4=

#3 GTEntertainment   Members   -  Reputation: 475

Like
0Likes
Like

Posted 29 June 2014 - 01:37 PM

yeah i tried that


I'm da almighty Gear


#4 rip-off   Moderators   -  Reputation: 9456

Like
3Likes
Like

Posted 29 June 2014 - 01:55 PM

Have you installed SDL? If so, how?

#5 fastcall22   Crossbones+   -  Reputation: 4870

Like
4Likes
Like

Posted 29 June 2014 - 01:56 PM

http://i.imgur.com/kEgaRqg.png


... Uhh, those should be lower case Ls, not pipes |... See GCC link options. Pipes are used to pipe output from programs elsewhere (to a file, another program, etc).
QWxsIHRvYXN0LXRvYXN0aW5nIHRvYXN0ZXJzIGNhbiB0b2FzdCB0b2FzdGVkIHRvYXN0LCBhbHRob3Vn aCByZS10b2FzdGluZyB0b2FzdGVkIHRvYXN0IGlzIGdlbmVyYWxseSBub3QgcmVjb21tZW5kZWQgYnkg dGhlIG1hbnVmYWN0dXJlcnMgb2YgdG9hc3QtdG9hc3RpbmcgdG9hc3RlcnMuLi4=

#6 LAURENT*   Members   -  Reputation: 266

Like
0Likes
Like

Posted 29 June 2014 - 02:13 PM

Um.... Did you put a. copy of the SDL.lib in the same folder as the exe file? I think you find it in the lib folder.



#7 GTEntertainment   Members   -  Reputation: 475

Like
0Likes
Like

Posted 29 June 2014 - 02:14 PM

Guys thanks I fixed the issue


I'm da almighty Gear


#8 Bacterius   Crossbones+   -  Reputation: 10042

Like
1Likes
Like

Posted 29 June 2014 - 03:58 PM

Guys thanks I fixed the issue

 

Care to share, just so this thread isn't totally useless and other people coming across it in the future can hope to fix their problem too?


Edited by Bacterius, 29 June 2014 - 03:58 PM.

The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis


#9 KotoR`eZ   Members   -  Reputation: 320

Like
0Likes
Like

Posted 29 June 2014 - 05:10 PM

Here is my folder structure:

C:\SDL2\bin
include
lib

These folders came from "i686-w64-mingw32" not "x86_64"
Codeblocks setup:
Linker settings -> other linker options: -lmingw32 -lSDL2main -lSDL2 -lSDL2_image -lSDL2_mixer

Search directories - Compiler:
C:\SDL2\include\SDL2
C:\SDL2\SDL2_image-2.0.0\i686-w64-mingw32\include\SDL2
C:\SDL2\SDL2_mixer-2.0.0\i686-w64-mingw32\include\SDL2

Search directories -Linker:

C:\SDL2\lib
C:\SDL2\SDL2_image-2.0.0\i686-w64-mingw32\lib
C:\SDL2\SDL2_mixer-2.0.0\i686-w64-mingw32\lib

//main.cpp
#include <SDL.h>
#include <SDL_image.h>
#include <SDL_mixer.h>

Should work perfectly fine.

#10 KotoR`eZ   Members   -  Reputation: 320

Like
0Likes
Like

Posted 29 June 2014 - 05:18 PM

I give up editing my post. It keeps changing characters for me... :(

#11 Sik_the_hedgehog   Crossbones+   -  Reputation: 1920

Like
0Likes
Like

Posted 29 June 2014 - 09:01 PM

Quickfix:
#include "SDL/SDL.h"

Double check your directories; you've a search directory, "C:\Users\sarmeanu\DOCS\SDL\include\", but SDL.h is located at "C:\Users\sarmeanu\DOCS\SDL\include\SDL\SDL.h".

Note that it's SDL2/SDL.h in the case of SDL 2.0 (saying this in case somebody else looks at that post).

 

And yeah, that seems to cause trouble a lot of time. The documentation insists that one should use "SDL.h", but I have tried that in the past and the compiler becomes unable to find the header. In the end I use <SDL2/SDL.h> and it works just fine. I think the issue is that the documentation assumes you're using pkg-config (which will add the SDL headers directory to the include list).


Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS