Jump to content
  • Advertisement
Sign in to follow this  
bdc256

SDL and Dev-Cpp

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

I have been trying to compile some SDL apps with Dev-Cpp but, I keep getting errors. The Sources seem to compile fine. The Errors are all listed as linking errors can't find SDL_*_*. I added -lsdl to my compiler options and to the linker. I also always get multiple definitions of SDL_Main. I was trying to compile the latest version of some of the lgames just if you were wondering. If only My linux disc was not broke :(

Share this post


Link to post
Share on other sites
Advertisement
Yes. Do I need to add them to the linker to or just to the compiler.(I've tried it with both and each indivdualy, still nothing). I am Using Dev-Cpp 4.9.9.2 and the mingw version of sdl 1.2.8. Could the be the problem? I am new to Dev-Cpp.

Share this post


Link to post
Share on other sites
You should only need to add them to the linker box. For another reference on setting up SDL with Dev-Cpp, take a look at this. Make sure you have it in the order of: "-lmingw32 -lSDLmain -lSDL" and you should be good to go. If not post some errors so we can have a look [wink]

Share this post


Link to post
Share on other sites
It's Good now. I had them in the wrong order I also need to ad
<code>
#if defined(_WIN32) && defined(__MINGW32__) //hack
#define SDL_main WinMain
#endif
</code>
to get it to work.

Share this post


Link to post
Share on other sites
No I was wrong it is not working at least not the tutorial on that page. I am getting DirectX linking error???? (edit) At least I think it's directX DX5_* undifed errors where the star is a wildcard (edit)

Share this post


Link to post
Share on other sites
I did the tutorial on cone3d no problem. Just start over completely and do exactly what is on that tutorial =).

Share this post


Link to post
Share on other sites
I must be using the wrong libs. I tried it with the version proved by cone3D and the program compiled fine. Thanks for the help.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!