User forums > Using Code::Blocks

Specifying an alternate library - boost in this case in Ubuntu

(1/1)

hnorpois:
Hello,

From the terminal it works:

--- Code: ---g++ -I /usr/include/ main.cpp -o example2 /usr/lib/x86_64-linux-gnu/libboost_regex.a
--- End code ---

I know the way is somewhere in the direction of Project -> Build Options ... but then I am not shure ... The problem ist the library direction (/usr/lib...) ... I tried -> Search Directories and Pre/Post build Steps. I guess Linker Settings is /usr/include. But if works without any additional linker settings if no libboost_yx is needed.
Could anybody give me a hint?
Thanks
hermann

oBFusCATed:
Hm, this looks like a default path for searching libraries.
I think that the only thing you should do is add boost_regex to the list of libraries and it should work.
Also

--- Code: ---g++ -I /usr/include/ main.cpp -o example2 -lboost_regex

--- End code ---
Should just work.

Navigation

[0] Message Index

Go to full version