Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Im trying to install the boost libraries and entered sudo apt-get libboost* i managed to set the include paths and the header-only librarys are working. when I try other libraries like regex I get an "reference not found" error Where do I set the paths for the Linker and what path do I need to set? (cant find the files on my file system)

share|improve this question

1 Answer 1

If you want to use libboost in eclipse you also need the header files or libboost-something-dev.

Then in CDT project properties->Build->Settings->compiler->include path
Make sure you have the folder containing the headers(probably automatic if you install the via -dev packages and your compile toolchain is set up properly).

Then in CDT project properties->Build->Settings->linker->libraries
Add the library name like you would to your gcc -l line in the top part and the search path(might be automatic if you use the -dev package) in the bottom part.

click->Apply
click->OK
And it should build.

Just a note: Using the global include and lib directories gets you automatic updates to components on apt-get update && apt-get upgrade + recompile. I personally like to cherry pick the .h and .a/.o files I need and put the in a project specific ./include and ./lib subfolder within the project.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.