Sign in to follow this  
Haku

My SDL problem

Recommended Posts

Ok, i have just installed the SDL pack with the bloodshed dev c++ compiler and am trying to start using SDL. It has been sucssesfully installed with no problems. I went to cone3d and got a tutorial for SDL. When i tried to run the completed source code i got these errors: - [Linker error] undefined reference to `SDL_LockSurface' - [Linker error] undefined reference to `SDL_UnlockSurface' - and loads of other things that begin with SDL_... whats going wrong and how do i fix it?

Share this post


Link to post
Share on other sites
You must link to the SDL lib file (can't remember its name SDLMain.lib?).
I can't tell you exactly how to do this, because I don't know which compiler you are using.

Good luck,
Pat.

Share this post


Link to post
Share on other sites
Quote:
Original post by Haku
yea i have read this but because bloodshed installed it for me shouldnt it be in the right place already?

Quote:
from the link above
Now in Dev-C++ start a new console project. Now go to the project options dialog (found in the menu Project). The thing we need to set here is the field that says "Further object files or linker options:". Type in "-lmingw32 -lSDLmain -lSDL" (w/o the quotes) inside it. Now click OK.

Are you sure you did that? [edit]I mean the bold part[/edit]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this