기호 추가 오류: Ogre Meshy를 컴파일할 때 명령줄에서 DSO가 누락되었습니다.

기호 추가 오류: Ogre Meshy를 컴파일할 때 명령줄에서 DSO가 누락되었습니다.

네, 전 전 애인의 질문을 많이 읽었습니다.이것그리고이것그리고이것그리고이것하지만 나에게는 아무것도 효과가 없습니다. 그래서 기본적으로 나는 컴파일하려고합니다오우거 메쉬하지만 오류가 발생해요

[100%] Linking CXX executable bin/RelWithDebInfo/OgreMeshy
/usr/bin/ld: CMakeFiles/OgreMeshy.dir/src/Core/AnimationPanel.cpp.o: undefined reference to symbol '_ZN5boost6system15system_categoryEv'
//usr/lib/x86_64-linux-gnu/libboost_system.so.1.58.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
CMakeFiles/OgreMeshy.dir/build.make:234: recipe for target 'bin/RelWithDebInfo/OgreMeshy' failed
make[2]: *** [bin/RelWithDebInfo/OgreMeshy] Error 1
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/OgreMeshy.dir/all' failed
make[1]: *** [CMakeFiles/OgreMeshy.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2

그래서 아래와 같이 CMakeLists에 Boost_system을 추가해 보았습니다.

if( UNIX )
    set( CMAKE_CXX_STANDARD 98 )
    # 
    target_link_libraries( OgreMeshy ${GTK2_LIBRARIES} ${OPENGL_LIBRARIES} boost_system )

하지만 이로 인해 또 다른 오류가 발생합니다.

[100%] Linking CXX executable bin/RelWithDebInfo/OgreMeshy
CMakeFiles/OgreMeshy.dir/src/Core/AnimationPanel.cpp.o: In function `AnimationPanel::showBones(bool)':
/home/slobodan/dark_sylinc-ogremeshy-2110b963ee28/src/Core/AnimationPanel.cpp:138: undefined reference to `Ogre::Skeleton::getRootBones() const'
CMakeFiles/OgreMeshy.dir/src/Core/MovableText.cpp.o: In function `Ogre::MovableText::setFontName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/slobodan/dark_sylinc-ogremeshy-2110b963ee28/src/Core/MovableText.cpp:62: undefined reference to `Ogre::ResourceManager::remove(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/home/slobodan/dark_sylinc-ogremeshy-2110b963ee28/src/Core/MovableText.cpp:75: undefined reference to `Ogre::ResourceManager::remove(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/OgreMeshy.dir/src/Core/MovableText.cpp.o: In function `Ogre::MovableText::~MovableText()':
/home/slobodan/dark_sylinc-ogremeshy-2110b963ee28/src/Core/MovableText.cpp:55: undefined reference to `Ogre::ResourceManager::remove(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/OgreMeshy.dir/src/Core/MovableText.cpp.o: In function `Ogre::MovableText::_setupGeometry()':
/home/slobodan/dark_sylinc-ogremeshy-2110b963ee28/src/Core/MovableText.cpp:207: undefined reference to `Ogre::VertexBufferBinding::setBinding(unsigned short, Ogre::SharedPtr<Ogre::HardwareVertexBuffer> const&)'
/home/slobodan/dark_sylinc-ogremeshy-2110b963ee28/src/Core/MovableText.cpp:216: undefined reference to `Ogre::VertexBufferBinding::setBinding(unsigned short, Ogre::SharedPtr<Ogre::HardwareVertexBuffer> const&)'
CMakeFiles/OgreMeshy.dir/src/Core/MovableText.cpp.o:(.rodata._ZTVN4Ogre11MovableTextE[_ZTVN4Ogre11MovableTextE]+0x50): undefined reference to `Ogre::MovableObject::getShadowVolumeRenderableIterator(Ogre::ShadowTechnique, Ogre::Light const*, Ogre::SharedPtr<Ogre::HardwareIndexBuffer>*, unsigned long*, bool, float, unsigned long)'
CMakeFiles/OgreMeshy.dir/src/Core/MovableText.cpp.o:(.rodata._ZTVN4Ogre11MovableTextE[_ZTVN4Ogre11MovableTextE]+0x68): undefined reference to `Ogre::ShadowCaster::generateShadowVolume(Ogre::EdgeData*, Ogre::SharedPtr<Ogre::HardwareIndexBuffer> const&, unsigned long&, Ogre::Light const*, std::vector<Ogre::ShadowRenderable*, std::allocator<Ogre::ShadowRenderable*> >&, unsigned long)'
CMakeFiles/OgreMeshy.dir/src/Core/wxOgreMeshViewerMainFrameImpl.cpp.o: In function `MeshyMainFrameImpl::unloadResourcesCfg()':
/home/slobodan/dark_sylinc-ogremeshy-2110b963ee28/src/Core/wxOgreMeshViewerMainFrameImpl.cpp:927: undefined reference to `Ogre::ResourceGroupManager::getResourceGroups[abi:cxx11]() const'
CMakeFiles/OgreMeshy.dir/src/Core/wxOgreMeshViewerMainFrameImpl.cpp.o: In function `MeshyMainFrameImpl::viewGridSettings()':
/home/slobodan/dark_sylinc-ogremeshy-2110b963ee28/src/Core/wxOgreMeshViewerMainFrameImpl.cpp:1235: undefined reference to `Ogre::ResourceManager::remove(Ogre::SharedPtr<Ogre::Resource> const&)'
CMakeFiles/OgreMeshy.dir/src/Core/wxOgreMeshViewerMainFrameImpl.cpp.o: In function `MeshyMainFrameImpl::showMeshInfo()':
/home/slobodan/dark_sylinc-ogremeshy-2110b963ee28/src/Core/wxOgreMeshViewerMainFrameImpl.cpp:979: undefined reference to `Ogre::Entity::getSubEntity(unsigned long) const'
CMakeFiles/OgreMeshy.dir/src/Core/wxOgreMeshViewerMainFrameImpl.cpp.o: In function `MeshyMainFrameImpl::loadResourcesCfg(wxString const&)':
/home/slobodan/dark_sylinc-ogremeshy-2110b963ee28/src/Core/wxOgreMeshViewerMainFrameImpl.cpp:848: undefined reference to `Ogre::Entity::getSubEntity(unsigned long) const'
/home/slobodan/dark_sylinc-ogremeshy-2110b963ee28/src/Core/wxOgreMeshViewerMainFrameImpl.cpp:914: undefined reference to `Ogre::Entity::getSubEntity(unsigned long) const'
CMakeFiles/OgreMeshy.dir/src/Core/wxOgreRenderWindow.cpp.o: In function `wxOgreRenderWindow::CreateRenderWindow()':
/home/slobodan/dark_sylinc-ogremeshy-2110b963ee28/src/Core/wxOgreRenderWindow.cpp:179: undefined reference to `Ogre::Root::createRenderWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int, bool, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const*)'
collect2: error: ld returned 1 exit status
CMakeFiles/OgreMeshy.dir/build.make:234: recipe for target 'bin/RelWithDebInfo/OgreMeshy' failed
make[2]: *** [bin/RelWithDebInfo/OgreMeshy] Error 1
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/OgreMeshy.dir/all' failed
make[1]: *** [CMakeFiles/OgreMeshy.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2

나는 또한 언급 된 것들을 시도했습니다여기하지만 그것도 작동하지 않습니다. 여기 내 CMakeList가 있습니다

#-------------------------------------------------------------------
# The contents of this file are placed in the public domain. Feel
# free to make use of it in any way you like.
#-------------------------------------------------------------------

project( OgreMeshy )

cmake_minimum_required(VERSION 2.8)

set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG" )

if( CMAKE_BUILD_TYPE STREQUAL "" )
    set( CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "One of: Debug Release RelWithDebInfo MinSizeRel." FORCE )
endif()

include( CMake/Dependencies/OGRE.cmake )
include( CMake/Dependencies/wxWidgets.cmake )
include( CMake/Install.cmake )

setupOgre( OGRE_SOURCE, OGRE_BINARIES, OGRE_LIBRARIES )
setupWxWidgets( wxWidgets_LIBRARIES GTK2_LIBRARIES OPENGL_LIBRARIES )

# Setup our application
set( EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/bin/${CMAKE_BUILD_TYPE}" )
if( MSVC )
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /arch:SSE2")
    add_definitions( -DUNICODE -D_UNICODE )
endif()

macro( add_recursive dir retVal )
    file( GLOB_RECURSE ${retVal} ${dir}/*.h ${dir}/*.cpp ${dir}/*.c )
endmacro()

include_directories( "./include" )

add_recursive( ./src SOURCES )
add_recursive( ./include HEADERS )
if( WIN32 )
    # Add embedded icon
    set( SOURCES ${SOURCES} ./scripts/Resources/Resource.rc )
endif()

add_executable( ${PROJECT_NAME} WIN32 ${SOURCES} ${HEADERS} )
target_link_libraries( ${PROJECT_NAME} ${OGRE_LIBRARIES} ${wxWidgets_LIBRARIES} )

if( UNIX )
    set( CMAKE_CXX_STANDARD 98 )
    # 
    target_link_libraries( OgreMeshy ${GTK2_LIBRARIES} ${OPENGL_LIBRARIES} boost_system )

endif()

#Copy resources to bin folders
macro( copy_resources BUILD_TYPE )
    file( REMOVE_RECURSE "${CMAKE_SOURCE_DIR}/bin/${BUILD_TYPE}/Resources" )
    file( COPY "./scripts/Resources/Fonts" DESTINATION "${CMAKE_SOURCE_DIR}/bin/${BUILD_TYPE}/Resources" )
    file( COPY "./scripts/Resources/Icons" DESTINATION "${CMAKE_SOURCE_DIR}/bin/${BUILD_TYPE}/Resources" )
    file( COPY "./scripts/Resources/Other" DESTINATION "${CMAKE_SOURCE_DIR}/bin/${BUILD_TYPE}/Resources" )
    file( RENAME "${CMAKE_SOURCE_DIR}/bin/${BUILD_TYPE}/Resources/Other" "${CMAKE_SOURCE_DIR}/bin/${BUILD_TYPE}/Resources/Models" )
    file( COPY "./scripts/Resources/Blender/Axis.material"           DESTINATION "${CMAKE_SOURCE_DIR}/bin/${BUILD_TYPE}/Resources/Models" )
    file( COPY "./scripts/Resources/Blender/Axis.mesh"               DESTINATION "${CMAKE_SOURCE_DIR}/bin/${BUILD_TYPE}/Resources/Models" )
    file( COPY "./scripts/Resources/Blender/Bones/BoneMesh.material" DESTINATION "${CMAKE_SOURCE_DIR}/bin/${BUILD_TYPE}/Resources/Models" )
    file( COPY "./scripts/Resources/Blender/Bones/Bones.png"         DESTINATION "${CMAKE_SOURCE_DIR}/bin/${BUILD_TYPE}/Resources/Models" )
    file( COPY "./scripts/Resources/Blender/Bones/BoneTip.mesh"      DESTINATION "${CMAKE_SOURCE_DIR}/bin/${BUILD_TYPE}/Resources/Models" )
    file( COPY "./scripts/Resources/Blender/Bones/BoneGlobe.mesh"    DESTINATION "${CMAKE_SOURCE_DIR}/bin/${BUILD_TYPE}/Resources/Models" )
    if( USE_RTSS )
        file( COPY "${OGRE_SOURCE}/Samples/Media/RTShaderLib"        DESTINATION "${CMAKE_SOURCE_DIR}/bin/${BUILD_TYPE}/Resources" )
    endif()

    if( UNIX )
        file( COPY "./scripts/Resources/OgreIcon.ico" DESTINATION "${CMAKE_SOURCE_DIR}/bin/${BUILD_TYPE}/Resources/" )
    endif()
endmacro()

copy_resources( "Debug" )
copy_resources( "Release" )
copy_resources( "RelWithDebInfo" )
copy_resources( "MinSizeRel" )

setupInstallers()

추가해 보았습니다

find_package(Boost 1.58.0 COMPONENTS filesystem system REQUIRED)

하지만 작동하지 않습니다. 또한 추가해 보았습니다.

 "LDFLAGS=-lm"

하지만 나도 같은 오류가 있어

관련 정보