[100%] Linking CXX shared library libmarsstn.so
/Users/xiekongying/Desktop/xky/ke/im/mars/mars/log/../boost/iostreams/device/mapped_file.hpp:295: error: undefined reference to 'mars_boost::iostreams::mapped_file_source::is_open() const'
/Users/xiekongying/Desktop/xky/ke/im/mars/mars/log/../boost/iostreams/device/mapped_file.hpp:299: error: undefined reference to 'mars_boost::iostreams::mapped_file_source::flags() const'
/Users/xiekongying/Desktop/xky/ke/im/mars/mars/log/../boost/iostreams/device/mapped_file.hpp:466: error: undefined reference to 'mars_boost::iostreams::mapped_file_source::data() const'
/Users/xiekongying/Desktop/xky/ke/im/mars/mars/log/../boost/iostreams/device/mapped_file.hpp:295: error: undefined reference to 'mars_boost::iostreams::mapped_file_source::is_open() const'
/Users/xiekongying/Desktop/xky/ke/im/mars/mars/log/../boost/iostreams/device/mapped_file.hpp:298: error: undefined reference to 'mars_boost::iostreams::mapped_file_source::operator!() const'
/Users/xiekongying/Desktop/xky/ke/im/mars/mars/log/../boost/iostreams/device/mapped_file.hpp:243: error: undefined reference to 'mars_boost::iostreams::mapped_file_source::mapped_file_source()'
/Users/xiekongying/Desktop/xky/ke/im/mars/mars/comm/../boost/iostreams/device/mapped_file.hpp:298: error: undefined reference to 'mars_boost::iostreams::mapped_file_source::operator!() const'
/Users/xiekongying/Desktop/xky/ke/im/mars/mars/comm/../boost/iostreams/device/mapped_file.hpp:295: error: undefined reference to 'mars_boost::iostreams::mapped_file_source::is_open() const'
/Users/xiekongying/Desktop/xky/ke/im/mars/mars/comm/../boost/iostreams/device/mapped_file.hpp:295: error: undefined reference to 'mars_boost::iostreams::mapped_file_source::is_open() const'
/Users/xiekongying/Desktop/xky/ke/im/mars/mars/comm/../boost/iostreams/device/mapped_file.hpp:298: error: undefined reference to 'mars_boost::iostreams::mapped_file_source::operator!() const'
/Users/xiekongying/Desktop/xky/ke/im/mars/mars/comm/../boost/iostreams/device/mapped_file.hpp:296: error: undefined reference to 'mars_boost::iostreams::mapped_file_source::close()'
/Users/xiekongying/Desktop/xky/ke/im/mars/mars/comm/../boost/iostreams/device/mapped_file.hpp:296: error: undefined reference to 'mars_boost::iostreams::mapped_file_source::close()'
/Users/xiekongying/Desktop/xky/ke/im/mars/mars/comm/../boost/iostreams/device/mapped_file.hpp:296: error: undefined reference to 'mars_boost::iostreams::mapped_file_source::close()'
/Users/xiekongying/Desktop/xky/ke/im/mars/mars/comm/../boost/iostreams/device/mapped_file.hpp:439: error: undefined reference to 'mars_boost::iostreams::mapped_file_source::open_impl(mars_boost::iostreams::basic_mapped_file_params<mars_boost::iostreams::detail::path> const&)'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libmarsstn.so] Error 1
make[1]: *** [CMakeFiles/marsstn.dir/all] Error 2
make: *** [all] Error 2
!!!!!!!!!!!!!!!!!!build fail!!!!!!!!!!!!!!!!!!!!
1条答案
按热度按时间ujv3wf0j1#
mars/log CMakeLists.txt中修改:
if(MSVC)
add_definitions(/FI"../../comm/projdef.h")
elseif(ANDROID)
file(GLOB SELF_ANDROID_SRC_FILES RELATIVE ${PROJECT_SOURCE_DIR}
../comm/xlogger/xloggerbase.c
jni/*.cc
../mk_template/JNI_OnLoad.cpp)
//增加:
link_directories(../comm)
link_libraries(comm)
link_directories(../boost)
link_libraries(mars-boost)
endif()