Problem getting SDL to work with Dev-C++
Hi every1
I'm new to SDL and need some help...
I want to get started with SDL, but I can't get it to work
There's what I got:
- Dev-C++ version 4.9.9.0
From www.libsdl.org I clicked on "SDL 1.2" and under
runtime libraries I downloaded:
- SDL-1.2.7-win32.zip
...and under developpement libraries I picked:
- SDL-devel-1.2.7-VC6.zip
and...
- SDL-devel-1.2.7-mingw32.tar.gz
(only VC6.zip has library and include files)
I copyed all files in both library and include from SDL
to the folders of Dev-C++
Then I started a new project and went to "Project Options"
and under "Parametres" in the "Linker" box I wrote:
-lmingw32
-mwindows
-lSDLmain
-lSDL
remember I have version 4.9.9.0
(the letter in th beginning is an l as in light or lame)
I wrote:
Code:
#include <iostream>
#include <stdlib.h>
#include <SDL/SDL.h>
using namespace std;
int main(int argc, char *argv[])
{
system("PAUSE");
return 0;
}
I tried to compile but it outputs errors:
SDL/SDL.h: No such file or library
[Build Error] [main.o] Error 1
I followed these instructions:
http://cone3d.gamedev.net/cgi-bin/i...ls/gfxsdl/index
Still it doesn't work plz help!!!
Don't use VC's files, different compilers don't seem to play well with each others' files. Use only the mingw compiler include files, and make sure you put an SDL.dll into your bin folder of Dev-C++.
Keep asking questions, you'll keep getting answers.
Keep asking questions, you'll keep getting answers.
You need to make sure the SDL headers are in the include path. Go to project options and directories. Hit the include tab and hit add, go to your SDL directory and select the include one. and add it. Now just say #include <SDL.h> and it should work.
Nope...
Doesn't work:
In the dl SDL-devel-1.2.7-mingw32.tar.gz I tried to add the SDL.dll file to "include", but it doesn't work becase I can't select the seperate file (SDL.dll) and add it.
I can only select the folder where both includes and libs are in.
So under "Project Options" - "Directories" - "Library Directory"
I wrote: C:\SDL\Mingw32\SDL-1.2.7-win32
And under "Include Directories" I wrote the same (because of the problem mentioned above)...
I copied SDL.dll into includes in my Dev-C++ folder and
SDL-devel-1.2.7-mingw32.tar.gz under libs...
Get the same errors
PS: No I haven't got that package you mentioned
Doesn't work:
In the dl SDL-devel-1.2.7-mingw32.tar.gz I tried to add the SDL.dll file to "include", but it doesn't work becase I can't select the seperate file (SDL.dll) and add it.
I can only select the folder where both includes and libs are in.
So under "Project Options" - "Directories" - "Library Directory"
I wrote: C:\SDL\Mingw32\SDL-1.2.7-win32
And under "Include Directories" I wrote the same (because of the problem mentioned above)...
I copied SDL.dll into includes in my Dev-C++ folder and
SDL-devel-1.2.7-mingw32.tar.gz under libs...
Get the same errors
PS: No I haven't got that package you mentioned
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement