Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: rbrettjuergens on May 17, 2011, 05:13:29 pm
-
I'm sure I just managed to missed something in the documentation; but, I was wondering if there is a way to add shared libraries like you would on the gcc command line. What I've found in the documentation is to:
right click on the project name to the left, select Build options..., select Linker settings tab, click Add, then dig through the file system one by one for each shared library.
Is manually adding each library the only way to do it or can I append libraries like on the gcc command line? eg. gcc main.c graphics.c -o mygoofyapp -ldl -lnsl -lm -lrt -pthread -g
-
You can enter the names of the libs directly, instead of browsing the filesystem...
Just type the name of the lib in the popup dialog.
-pthread should be added to the other options both for compiler and linker.
-g is a compiler option and there is a checkbox for it.
-
Note that you can type multiple libs in the popup dialog separating them with semicolons, e.g.:
dl;nsl;m;rt
If you type the above in the popup, it will add 4 different entries in the libs list.