last day (15 days later) » 

9:53 AM
0
A: CMake with Boost 1.62.0: "No Boost libraries were found"

wasthishelpfulLooking in the documentation: set(Boost_INCLUDE_DIRS D:/Tools/boost_1_62_0/boost) set(Boost_LIBRARY_DIRS D:/Tools/boost_1_62_0/libs) Boost_INCLUDE_DIRS and Boost_LIBRARY_DIRS are variables filled by Boost package, so you shouldn't set them: remove these lines. set(BOOST_INCLUDEDIR C:/MinGW/in...

 
it's no need to remove include_directories(${Boost_INCLUDE_DIRS})
 
I don't say you need to remove this line. I say this line is useless as long as you're using imported targets ;)
 
I removed from find_package COMPONENTS.. and added ${Boost_FILESYSTEM_LIBRARIES} ${Boost_SYSTEM_LIBRARIES} to the target link libraries, CMake build was successfull but when I try to build project compiler could not find reference to system library implementation. I use boost/asio, compliler seen declarartion in H files but doesn't seen libs where functions are realized
 
Great, but I didn't say anything about ${Boost_FILESYSTEM_LIBRARIES} nor ${Boost_SYSTEM_LIBRARIES} in my answer. Did you try to use Boost::filesystem?
 
Error:Target "TrustLineManager" links to target "Boost::filesystem" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?
 
9:53 AM
Either your path D:/Tools/boost_1_62_0/ is invalid, or you didn't compile the libraries?
 
path is valid, cause I can include boost to project, I can't compile the libs
 
Edit your question with the following information : how did you installed Boost? Did you follow any tutorial to build the non-header-only components like filesystem? What does D:/Tools/boost_1_62_0/ contains? Be as precise and complete as possible
 
I edit question, check it pls)
 
find_package(Boost): why did you remove the COMPONENTS list and the REQUIRED parameter?
Get it back to find_package(Boost REQUIRED COMPONENTS filesystem)
Seriously, when someone is taking time to help you do as you're told. No less, no more
 
10:10 AM
It's still does not working. Now I do all as you say
cmake_minimum_required(VERSION 3.6)
project(TrustLineManager)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

set(SOURCE_FILES main.cpp trust_lines/TrustLine.cpp trust_lines/TrustLine.h trust_lines/TrustLinesManager.cpp trust_lines/TrustLinesManager.h trust_lines/TrustLinesManagerTest.cpp trust_lines/TrustLinesManagerTest.h trust_lines/Exception.cpp trust_lines/Exception.h trust_lines/ValueError.h trust_lines/ConflictError.h trust_lines/PreconditionFaultError.h)

set(BOOST_ROOT "D:/Tools/boost_1_62_0")
 
find_package(Boost REQUIRED system filesystem COMPONENTS) should be find_package(Boost REQUIRED COMPONENTS system filesystem) , but I don't think that's an issue (but check it)
You never answered my questions: how did you installed Boost? Did you follow a tutorial?
 
It's not help
Error:Unable to find the requested Boost libraries.
Boost version: 1.62.0
Boost include path: D:/Tools/boost_1_62_0
Could not find the following static Boost libraries:
boost_system boost_filesystem
No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.
 
10:27 AM
I download and unzip boost archive in D disk
Mabye try to change MinGW to Cygwin ?
 
Where did you download the archive from?
Did you ever compile filesystem?
 
I saw in boost docs that boost directory contains lib forlder with precompiled library binaries. Is it its ?
 
10:58 AM
No it isn't. You need to compile the libraries. Take a look at the documentation
 

  last day (15 days later) »