SDL Linker error

Hey.
I'm trying to learn to make game in SDL and so I'm working on to make sound.
but when I want to compile it I get trouble
http://www.pictureshoster.com/files/aue55xvl4nmnx12zwi.png
check the link to see some of them
a lot of linker errors, and I don't what I going to do to get rid of it.
closed account (S6k9GNh0)
1. Don't use Dev-C++, its out of date, no longer maintained or supported, and there are much better alternatives.

2. You need to link to the library.
Last edited on
Just to be sure, what do I do to link to the lib
and what could you recommend
Last edited on
its an option you would need to use in the command that does the compiling (if you do step by step compiling you'd need to do it at the linking stage), I don't even know if dev-c++ supports such a thing. I use eclipse and it is capable of linking for you if you dont care to do it yourself.

if you use the gnu compiler, you would include -llibrary or -l library, where the library has a filename appropriate for the job. usually liblibrary.a though it could be liblibrary.so or liblibrary.dylib(mac) for dynamic link libraries, or something else similar. (if you use mingw i'm not entirely sure what the name syntax for dlls are or if it is capable of producing/using *.a, since I dont do library programming very often.) If the library is not on the path, you'll need to provide a search path using -L path

If you use eclipse, you can define all these parameters in the project properties under C/C++ Build-->Settings and it will use the proper commands in the proper place when compiling the binary. Just make sure you get the right version of Eclipse, as the default eclipse is intended for java, you can get one that is set up for c/c++ (or you can install the support for C/C++ development yourself after downloading the basic eclipse if you're so inclined).

-edit: Found something that explains use for mingw in case you or anybody else cares.
http://www.mingw.org/wiki/Specify_the_libraries_for_the_linker_to_use
Last edited on
Topic archived. No new replies allowed.