Operating System: Ubuntu 18.04.3 LTS
Render System: OpenGL 3+
A while ago I had started a project with Ogre, using Cmake. I had installed Ogre from the github repo, and everything worked fine. Today I updated Ogre (same way), and updated my CMakeList.
Now here's what I'm getting :
Code: Select all
./bin/mtest: error while loading shared libraries: libzzip.so.13: cannot open shared object file: No such file or directory
Here's my CMakeList.txt (here using Ogre's ZZip) :
Code: Select all
cmake_minimum_required (VERSION 3.0.0)
#set the executable
project (mtest)
set(EXECUTABLE_OUTPUT_PATH bin)
file(GLOB_RECURSE CPPS src/*.cpp)
add_executable (mtest ${CPPS})
#defines Ogre3D
find_package(OGRE 1.12.0 REQUIRED COMPONENTS Bites RTShaderSystem)
file(COPY ${OGRE_CONFIG_DIR}/resources.cfg DESTINATION ${CMAKE_BINARY_DIR})
target_link_libraries(mtest ${OGRE_LIBRARIES})
#defines ZZip
add_library(zzip INTERFACE IMPORTED)
set_target_properties(zzip PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "/home/user/Documents/ogre/build/Dependencies/include/"
INTERFACE_LINK_LIBRARIES "/home/user/Documents/ogre/build/Dependencies/lib/libzzip.so")
target_link_libraries(mtest zzip)
#defines OIS
add_library(ois INTERFACE IMPORTED)
set_target_properties(ois PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "/usr/local/include/ois/"
INTERFACE_LINK_LIBRARIES "/usr/local/lib/libOIS.so")
target_link_libraries(mtest ois)
#defines spdlog
find_package(spdlog REQUIRED)
target_link_libraries(mtest spdlog::spdlog)
Code: Select all
-- Found OGRE
-- static : OFF
-- components : Bites;HLMS;MeshLodGenerator;Overlay;Paging;Property;RTShaderSystem;Terrain;Volume
-- plugins : Plugin_BSPSceneManager;Plugin_OctreeSceneManager;Plugin_PCZSceneManager;Plugin_ParticleFX;RenderSystem_GL;RenderSystem_GL3Plus;Codec_STBI;Codec_FreeImage;Codec_EXR
-- media : /usr/local/share/OGRE/Media
-- Configuring done
-- Generating done
-- Build files have been written to: /home/alan/Documents/xmpp_tests/build
Scanning dependencies of target mtest
[ 33%] Building CXX object CMakeFiles/mtest.dir/src/logger.cpp.o
[ 66%] Building CXX object CMakeFiles/mtest.dir/src/main.cpp.o
[100%] Linking CXX executable bin/mtest
/usr/bin/ld: warning: libzzip.so.13, needed by /usr/local/lib/libOgreMain.so.1.12.0, not found (try using -rpath or -rpath-link)
/usr/local/lib/libOgreMain.so.1.12.0: undefined reference to `zzip_file_close'
/usr/local/lib/libOgreMain.so.1.12.0: undefined reference to `zzip_error'
/usr/local/lib/libOgreMain.so.1.12.0: undefined reference to `zzip_file_read'
/usr/local/lib/libOgreMain.so.1.12.0: undefined reference to `zzip_strerror_of'
/usr/local/lib/libOgreMain.so.1.12.0: undefined reference to `zzip_dir_close'
/usr/local/lib/libOgreMain.so.1.12.0: undefined reference to `zzip_dirhandle'
/usr/local/lib/libOgreMain.so.1.12.0: undefined reference to `zzip_dir_read'
/usr/local/lib/libOgreMain.so.1.12.0: undefined reference to `zzip_tell'
/usr/local/lib/libOgreMain.so.1.12.0: undefined reference to `zzip_dir_open_ext_io'
/usr/local/lib/libOgreMain.so.1.12.0: undefined reference to `zzip_seek'
/usr/local/lib/libOgreMain.so.1.12.0: undefined reference to `zzip_dir_stat'
/usr/local/lib/libOgreMain.so.1.12.0: undefined reference to `zzip_file_open'
collect2: error: ld returned 1 exit status
CMakeFiles/mtest.dir/build.make:131: recipe for target 'bin/mtest' failed
make[2]: *** [bin/mtest] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/mtest.dir/all' failed
make[1]: *** [CMakeFiles/mtest.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2