Libraries seem not to be linked (Ubuntu 18.04.1)

(jpcofr) #1

I installed boost libraries. Then, I tried to build a small boost code example using cmake.

Cmake cannot find boost when executing find_package.

I’ve already unlinked and linked boost. I’ve also run brew doctor and everything seems ok.

It seems that I have to write explicitly on the CMakeLists.txt the path to the boost libraries, but I think that that should not be the way to solve this… any suggestions?

(Steve Peters) #2

If you build the sample code inside a homebrew formula, I think it should be able to find the libraries, but if you manually invoke cmake, you will need to add brew --prefix to your CMAKE_PREFIX_PATH. You may need to set LD_LIBRARY_PATH as well if you like to boost libraries.