This topic is now archived and is closed to further replies.


Dev-C++ and compiling...

Recommended Posts

I use dev-c++ and when I make my sdl programs, they compile fine but in the linker it says there is an undefined reference to all the functions, so I can''t ruun the programs. Is there something I''m doing wrong? Please help

Share this post

Link to post
Share on other sites
Don't know if you do something wrong, because you didn't say what you did.

I'll decribe how it works for me:
In project options under "Further blabla linker options" you have to fill in
-lmingw32 -lSDLmain -lSDL
(also you may want to check do not create a console, but that is not imporatant now.)

Now the linker will look in the Dev-C++/Lib directory to find the files libSDLmain.a and libSDL.a (libmingw32.a is already on it's spot during instalation of devc++). So the question is, where did you put these??? If they are in the Lib directory then it is ok, else you have to go to "tools-compiler options" and add the directory where they are to the Libraries directory (at the very bottom).

Then they should link.....

[edited by - smilydon on April 30, 2002 9:59:53 PM]

Share this post

Link to post
Share on other sites