Jump to content
  • Advertisement
Sign in to follow this  
sinx

SDL.H no such file or directory WHAT DA ????

This topic is 4834 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i installed SDL and im using VC 6 ive read all the docs and html info on how to install it everything seems fine but ! when i compile it always says " sdl/sdl.h no such file or directory " and yes i did put the path in the include dir and also pointed to the library and added the .dll in windows/system none of the example codes ive downloaded will work because of this can someone help me please ??? thanks a lot mates !

Share this post


Link to post
Share on other sites
Advertisement
I've been having something of a similar problem, although it's with Dev C++.

With Dev C++, it's a slightly different ordeal, and my solution has been lately just to download the silly devpaks and install it that way. Buuuuuut. I digress.

Check to make sure SDL is extracting all it's respective folders (include, bin, lib I believe are the most important ones) in the right areas. What your path is going to want to link up with, I'm sure, is the 'include' path. That's the folder with SDL.h. There's still some extra stuff you'll have to do to initialize a project for VC6, and that's best explained here.

http://sol.gfxile.net/gp/ch01_vc6.html

From there, either #include "sdl.h" or #include "sdl/sdl.h" should work. *should*.

If you've already done this, sorry, I'm just checking the most possible errors. :)
It doesnt' help that I have no experience with VC6, either. Hope this helps you!

Share this post


Link to post
Share on other sites
I would suggest this:

1. Make sure the file is physically where you are asking the compiler to look for it
2. Use angle brackets - #include <SDL/SDL.h>
3. Try a backslash - SDL\SDL.h I don't know how VC uses these, so don't blame me for putting in a possibly worthless suggestion.

Share this post


Link to post
Share on other sites
Quote:
Original post by deavik
2. Use angle brackets - #include <SDL/SDL.h>

If I recall correctly, angle brackets instruct the compiler to search the system includes and any location the compiler sees fit. Although many compilers will actually find the requested header (since the specified include-dirs are included in the search), quotation marks are the most correct here, I believe.

Share this post


Link to post
Share on other sites
Yes, if you use <> then the system will look in all directories included in the project setup.

Make sure you've added the directory containing your SDL.h into your project options. Also make sure you do the same for the libs. To include individual libraries you do
#pragma comment(lib,"libname.lib")

Share this post


Link to post
Share on other sites
I've had the same problem when I go to try a SDL tut, but when I put this header in,

#include <stdio.h>
#include <stdlib.h>
#if defined(_MSC_VER)
#include "SDL.h"
#else
#include "SDL/SDL.h"
#endif

I have no problems. Hope this helps.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!