Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: hnorpois on September 02, 2016, 09:47:58 pm

Title: Specifying an alternate library - boost in this case in Ubuntu
Post by: hnorpois on September 02, 2016, 09:47:58 pm
Hello,

From the terminal it works:
Code
g++ -I /usr/include/ main.cpp -o example2 /usr/lib/x86_64-linux-gnu/libboost_regex.a

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
Title: Re: Specifying an alternate library - boost in this case in Ubuntu
Post by: oBFusCATed on September 06, 2016, 04:29:44 pm
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
Should just work.