User forums > Using Code::Blocks
Linking and using other libs
JessH:
Hi guys I'm new to c++ programming and after a few days trying different IDEs I've chosen C::B.
I have been writing some simple stuff and it was all ok until i needed to use some other libraries. I guess it has to do with setting the path or something like that. I tried this :
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_I_would_like_to_compile_a_project_using_some_non-standard_libraries._How_can_I_indicate_to_CodeBlocks_that_these_libraries_and_include_files_exist.3F
but it doesn't seem to work. I did that and added a lot of folders, I even tried with adding all the folders in the tree one by one, but when I try to compile my program C::B doesn't find the functions that I call. The error says "undefined reference to XXfuncion ".
I also tried searching in the forum but I got nothing :( , I hope I posted this in the right place and wish you can help me ^^
Edit :I'm using suse and C::B 10.05 (Debugger 0.3 compiler 0.99)
Jenna:
Did you also add the librar(y)(ies) to the "Link libraries:" in the projects/targets "Linker settings" ?
JessH:
I can't find that option. If you mean settings>debugger and compiler>linker settings tab , yes I did.
I'm trying to fin that projects/target option now ...
Jenna:
"Project -> Build options -> Linker settings -> Link libraries"
JessH:
OK I found it thanks. It was empty. Though I don't have a .a .so .lib or so to add , I installed the library from source and I got the .cpp .hpp .o ... is there any other way ?
In Konsole when I g++ specifying -l and the library name it works fine
Navigation
[0] Message Index
[#] Next page
Go to full version