Jump to content

I have the following Problem. I'm trying to build myself some c++ source code from a repository. Problem is, I've been programming in Java all my life, so I have no Idea how to fix this error I keep getting. Now I was able to successfully compile the code on Ubuntu, but am failing to do so on Windows. I'm using cmake and tried both the visual studio 2017 compilers and mingw's gcc compiler. But every single time I try to configure the project, I get an error involving the boost libraries. I have them downloaded and I did link to the correct directory (I tried many different boost versions, but I always get the same result). Here's the error:

41nOBBi.png

Please help me. It's been two weeks and I'm not a step closer to solving this and I really need to get this done at some point.

Link to comment
https://linustechtips.com/topic/888783-need-help-compiling-c-code/
Share on other sites

Link to post
Share on other sites

In addition to including the boost_1_55_0 folder, you also need to include the compiled library files for those modules. Most of Boost is header-only, but the ones listed must be compiled separately first. So you can either download the already-built binaries for the specific compiler (MSVC or mingw) and architecture (x86 or x86_64), or build them from source. I would reccommend the first as it would probably be easier. So download and install them from here. CMake may then automatically know where the libraries are (through detection of common paths), or you may set those variables in your CMakeLists.txt. I don't know where the libraries get installed on Windows, but assuming it's something like C:/Program Files/boost, you'd add these lines:

# In your CMakeLists.txt file
set (BOOST_ROOT "C:/Program Files/boost")
set (BOOST_LIBRARYDIR "C:/Program Files/boost")

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×