SDL.H no such file or directory WHAT DA ????
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 !
just try doing
#include "sdl.h"
instead of sdl/sdl.h unless you actually put the sdl.h file in a folder called /sdl
#include "sdl.h"
instead of sdl/sdl.h unless you actually put the sdl.h file in a folder called /sdl
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!
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!
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.
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.
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.
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
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")
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.
#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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement