Boost Filesystem fails with FreeBSD 10, clang, and cmake

看板FB_questions作者時間11年前 (2014/06/20 09:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
Hello all, I am currently migrating to a FreeBSD 10 system which comes default with cl= ang language. I was able to compile Boost just fine. But when I include f= ilesysstem.hpp to it, I get the following error message: = > Linking CXX executable boost_clang_test > /usr/bin/ld: : invalid DSO for symbol `_ZN5boost6system15system_categoryE= v' definition > /usr/local/lib/libboost_system.so.1.55.0: could not read symbols: Bad val= ue > CC: error: linker command failed with exit code 1 (use -v to see invocati= on) > *** Error code 1 > = > Stop. I am using cmake as my build system, could it be possible that I need to ad= just my cmake variables? I am not sure if I've came to correct forum or sh= ould this be on Boost, clang, CMake forum(s)? Please let me know if I am a= t the wrong place=85 The minimum amount of code to induce the problem are the following 2 files: CMakeLists.txt: cmake_minimum_required(VERSION 2.8) # Find and include Boost libraries find_package(Boost 1.55 COMPONENTS filesystem REQUIRED) include_directories(${Boost_INCLUDE_DIR}) set(LIBS ${LIBS} ${Boost_LIBRARIES}) set(BOOST_CLANG_TEST_SOURCES ${SOURCES} main.cpp) add_executable(boost_clang_test ${BOOST_CLANG_TEST_SOURCES}) target_link_libraries(boost_clang_test ${LIBS}) main.cpp: #include <stdio.h> #include <iostream> #include <sstream> #include <string> #include <boost/filesystem.hpp> using namespace std; using namespace boost::filesystem; const char *progname; int main(int argc, char **argv){ return 0; } Thanks in advance. _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
文章代碼(AID): #1JeuyIU2 (FB_questions)
文章代碼(AID): #1JeuyIU2 (FB_questions)