Can't Get SDL Started!

Started by
22 comments, last by ozzoright 17 years, 12 months ago
Hi, I'm trying to learn how to program in SDL, but can't seem to get it started. I'm using Dev-C++ and every time I include "SDL/SDL.h" I get an error in my program. I've done something wrong, but I don't know what. I am using the Lazy Foo Tutorials and I'm pretty sure I did everything right. I'd like to stick to these tutorials if I can, they're quite good. Thanks in return. :)
Advertisement
What error are you getting? may help narrow it down. You will need to tell the linker where to find the SDL library files (.DLL/.lib etc).

I recently began SDL programming with Visual C++ and Win Xp.
The IDE says there is no such file or directory. How do I tell the linker were to find the files?
When you include the header for SDL you also need to tell the linker where to find the library. The SDL header info is contained in the libraries, your compiler has not found these libraries either because they arnt in any of the default search paths/directories or you havent specified explicitly where it should look.

I havent used your IDE though, so cant tell you how to do that, check the IDE help docs with regards to adding DLL's/.libs etc.
I've looked into it, and I have linked the files. (Unkowningly!)
hello,

I've downloaded SDL1.2 to use it with Dev-C++, but when i unpacked it, there were no folders in it, just a bunch of files. So now I don't know which file to copy where. I've found four libSDL files, and none called bin or include.

can anyone help me out?
This is wrong. There should be folders. You might have downloaded the wrong thing.
This works: http://www.libsdl.org/release/SDL-devel-1.2.9-mingw32.tar.gz
OK, i found it, thanks!

but a new problem: the version of dev-c++ lazy foo used is different than mine. I can't chose all the options he described when accessing "project options".

see:

http://lazyfooproductions.com/SDL_tutorials/lesson01/windows/devcpp/index.php
Quote:Original post by Anonymous Poster
OK, i found it, thanks!

but a new problem: the version of dev-c++ lazy foo used is different than mine. I can't chose all the options he described when accessing "project options".

see:

Lazy Foo's SDL tutorials


Just upgrade Dev C++.

[Edited by - Lazy Foo on August 10, 2007 12:50:08 AM]

Learn to make games with my SDL 2 Tutorials

off course..

sorry about that, i thought i had the latest version.
everything is installed now, but i still can't make it work. when compiling some examples i get linker errors: undefined reference to 'SDL_RWfromfile' etc...

i added the devcpp\include\SDL directory to the C++ includes directories mentioned in the compiler options but that didn't help. do i need to do anything else or is reïnstalling the whole bunch the way to go?

greetings, T

This topic is closed to new replies.

Advertisement