I'm VERY new to OGRE and am trying to learn the system. I built OGRE-next and I am using static libraries. I built v2.3.3, v3.0.0 and tried master.
When I try to use this line (from Tutorial 00) in my own project:
Code: Select all
HlmsUnlit::getDefaultPaths( mainFolderPath, libraryFoldersPaths );
I get a bunch of linking errors.
Code: Select all
/usr/bin/ld: /home/myuser/src/vendor/ogre-next/build/Debug/lib/libOgreNextHlmsPbsStatic_d.a(OgreHlmsPbs.cpp.o): in function `Ogre::HlmsPbs::HlmsPbs(Ogre::Archive*, std::vector<Ogre::Archive*, std::allocator<Ogre::Archive*> >*)':
/home/myuser/src/vendor/ogre-next/Components/Hlms/Pbs/src/OgreHlmsPbs.cpp:270:(.text+0xad): undefined reference to `Ogre::ConstBufferPool::ExtraBufferParams::ExtraBufferParams(unsigned long, Ogre::BufferType, bool)'
/usr/bin/ld: /home/myuser/src/vendor/ogre-next/Components/Hlms/Pbs/src/OgreHlmsPbs.cpp:334:(.text+0xc1): undefined reference to `Ogre::ConstBufferPool::ConstBufferPool(unsigned int, Ogre::ConstBufferPool::ExtraBufferParams const&)'
/usr/bin/ld: /home/myuser/src/vendor/ogre-next/build/Debug/lib/libOgreNextHlmsPbsStatic_d.a(OgreHlmsPbs.cpp.o): in function `Ogre::HlmsPbs::~HlmsPbs()':
/home/myuser/src/vendor/ogre-next/Components/Hlms/Pbs/src/OgreHlmsPbs.cpp:346:(.text+0x594): undefined reference to `Ogre::ConstBufferPool::~ConstBufferPool()
My project's CMakeLists.txt looks like:
Code: Select all
cmake_minimum_required(VERSION 3.17)
project(hello_ogre_next)
set(CMAKE_CXX_STANDARD 17)
add_executable(hello_ogre_next main.cpp)
target_compile_options(hello_ogre_next
PRIVATE -w
PRIVATE -msse
PRIVATE -msse2
PRIVATE -g
)
target_include_directories(hello_ogre_next
PRIVATE /home/myuser/src/vendor/ogre-next/OgreMain/include
PRIVATE /home/myuser/src/vendor/ogre-next/build/Debug/include
PRIVATE /home/myuser/src/vendor/ogre-next/Components/Hlms/Pbs/include
PRIVATE /home/myuser/src/vendor/ogre-next/Components/Hlms/Unlit/include
PRIVATE /home/myuser/src/vendor/ogre-next/Components/Hlms/Common/include)
target_link_directories(hello_ogre_next
PRIVATE /home/myuser/src/vendor/ogre-next/build/Debug/lib
PRIVATE /home/myuser/src/vendor/ogre-next-deps/build/ogredeps/lib)
target_link_libraries(hello_ogre_next
OgreNextMainStatic_d
OgreNextHlmsPbsStatic_d OgreNextHlmsUnlitStatic_d RenderSystem_GL3PlusStatic_d
OgreSamplesCommon_d
X11 xcb freeimage zzip Xt Xrandr Xaw
)
Any idea what library that I am missing to make these link errors go away?