Author Topic: Specifying an alternate library - boost in this case in Ubuntu  (Read 2205 times)

hnorpois

  • Guest
Specifying an alternate library - boost in this case in Ubuntu
« 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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Specifying an alternate library - boost in this case in Ubuntu
« Reply #1 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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]