Sign in to follow this  
bdc256

SDL and Dev-Cpp

Recommended Posts

bdc256    154
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
bdc256    154
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
Drew_Benton    1861
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
bdc256    154
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
bdc256    154
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
Yamian    100
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
bdc256    154
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

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