Dev-C++ and compiling...

Started by
1 comment, last by PepsiPlease 21 years, 11 months ago
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
Advertisement
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]
Well, I made a mistake.

It seems the SDL.h file was called SDL\SDL.h in the package I downloaded, so its all good now.

Well, thanks for trying.

[edited by - PepsiPlease on April 30, 2002 11:11:05 PM]

This topic is closed to new replies.

Advertisement