Actually I have built boost from source with the version I downloaded, and I've 
run the install script given by boost. However, I just cannot let CMake find it.


[ D:/Program Files/CMake/share/cmake-3.9/Modules/FindBoost.cmake:1450 ] 
_boost_LIBRARY_SEARCH_DIRS_RELEASE = D:/Program Files/PCL 
1.8.0/3rdParty/Boost/include/boost-1_61/lib; ...(many other directories)
[ D:/Program Files/CMake/share/cmake-3.9/Modules/FindBoost.cmake:1595 ] 
Searching for THREAD_LIBRARY_RELEASE: 
libboost_thread-vc141-mt-1_61;libboost_thread-vc141-mt;libboost_thread-vc140-mt-1_61;libboost_thread-vc140-mt;libboost_thread-mt-1_61;libboost_thread-mt;libboost_thread
 



These are two lines in the output message, and I'm sure there is a file named 
"libboost_thread-vc141-mt-1_61.lib" in the lib directory listed in the first 
line where CMake will search for in.


However, the error message told me:


Could not find the following static Boost libraries: boost_thread


I don't know how this happened since it seems that CMake had already found the 
lib files. The attached log file shows the detail.


(PS: really sorry to reply again, I'm new to mailing list service)


Thanks,
Jacob Zhong


------------------ ???????? ------------------
??????: "Bo Zhou";<bo.schwarzst...@gmail.com>;
????????: 2017??8??4??(??????) ????12:19
??????: "??????"<cmp...@qq.com>; 
????: "cmake"<cmake@cmake.org>; 
????: Re: [CMake] Not able to find boost with cmake



It's better not to use downloaded pre-built libraries, always build by yourself 
locally.



Before using Boost with CMake, please check 
https://cmake.org/cmake/help/v3.0/module/FindBoost.html


If you're trying to use static boost libraries build by MSVC with shared 
runtime, please make sure the following statements exist in the PCL.

set(Boost_USE_STATIC_LIBS ON)

set(Boost_USE_MULTITHREADED ON)

set(Boost_USE_STATIC_RUNTIME OFF)




Then if you properly set the Boost_INCLUDE_DIR, all the libraries should be 
ready then.


On Fri, Aug 4, 2017 at 1:05 PM, ?????? <cmp...@qq.com> wrote:
I'm trying to build PCL which has boost as dependency. However, when I download 
boost and build it, cmake cannot find it through any way.


I tried two version of boost, one is pre-build boost which was built by other 
person online and version is 1.61, another is one I downloaded whose version is 
1.64. File structures of the two versions are the same:
[XXX]/include/boost-1_64/boost is the include dir and [XXX]/lib is the bin dir




I try to specify the Boost_INCLUDE_DIR to [XXX]/include/boost-1_64/boost, the 
messages in output window is attached (I turned Boost_DEBUG on).


I'm on Window 10 and VS2017


Thanks,
Jacob Zhong



------------------
????????


??????  Yuanxin Zhong
??????????????????  Dept. of Automotive Engineering, Tsinghua Univ.
Ad:Haidian District, Beijing, P.R.China    100084
Tel:+86 17888833119
E-mail??cmp...@foxmail.com / zhongy...@mails.tsinghua.edu.cn



 

--
 
 Powered by www.kitware.com
 
 Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ
 
 Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:
 
 CMake Support: http://cmake.org/cmake/help/support.html
 CMake Consulting: http://cmake.org/cmake/help/consulting.html
 CMake Training Courses: http://cmake.org/cmake/help/training.html
 
 Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html
 
 Follow this link to subscribe/unsubscribe:
 http://public.kitware.com/mailman/listinfo/cmake
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to