Jump to content
  • Advertisement
Sign in to follow this  
ozzoright

Can't Get SDL Started!

This topic is 4596 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

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. :)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Guest 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:

http://lazyfooproductions.com/SDL_tutorials/lesson01/windows/devcpp/index.php

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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

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!