I've been trying for the past couple of days to compile ogre statically from source on MacOS. I've been mostly following this guide from http://www.ogre3d.org/tikiwiki/tiki-ind ... ef_id=2159, which has otherwise been very useful. I'm using ogre 1.10.
I've managed to compile ogre to static libraries and got pretty far into fitting it all together with a cmake file. The problem I'm getting is when I write the code to load in the render system, it spits out a load of errors.
Here is what I get:
Code: Select all
[ 66%] Linking CXX executable ogre
Undefined symbols for architecture x86_64:
"Ogre::GLRTTManager::releaseRenderBuffer(Ogre::GLSurfaceDesc const&)", referenced from:
Ogre::GLFrameBufferObject::~GLFrameBufferObject() in libRenderSystem_GLStatic.a(OgreGLFrameBufferObject.o)
Ogre::GLFrameBufferObject::~GLFrameBufferObject() in libRenderSystem_GLStatic.a(OgreGLFrameBufferObject.o)
Ogre::GLFrameBufferObject::initialise() in libRenderSystem_GLStatic.a(OgreGLFrameBufferObject.o)
"Ogre::GLRTTManager::createMultiRenderTarget(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
vtable for Ogre::GLPBRTTManager in libRenderSystem_GLStatic.a(OgreGLPBRenderTexture.o)
vtable for Ogre::GLCopyingRTTManager in libRenderSystem_GLStatic.a(OgreGLCopyingRenderTexture.o)
"Ogre::GLRTTManager::getSupportedAlternative(Ogre::PixelFormat)", referenced from:
Ogre::GLTextureBuffer::blitFromTexture(Ogre::GLTextureBuffer*, Ogre::Box const&, Ogre::Box const&) in libRenderSystem_GLStatic.a(OgreGLHardwarePixelBuffer.o)
Ogre::GLTextureManager::getNativeFormat(Ogre::TextureType, Ogre::PixelFormat, int) in libRenderSystem_GLStatic.a(OgreGLTextureManager.o)
"Ogre::getGLSupport(int)", referenced from:
Ogre::GLRenderSystem::GLRenderSystem() in libRenderSystem_GLStatic.a(OgreGLRenderSystem.o)
"Ogre::GLRenderTexture::CustomAttributeString_FBO", referenced from:
Ogre::GLRenderSystem::_createDepthBufferFor(Ogre::RenderTarget*) in libRenderSystem_GLStatic.a(OgreGLRenderSystem.o)
Ogre::GLFBORenderTexture::getCustomAttribute(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, void*) in libRenderSystem_GLStatic.a(OgreGLFBORenderTexture.o)
Ogre::GLFBOManager::bind(Ogre::RenderTarget*) in libRenderSystem_GLStatic.a(OgreGLFBORenderTexture.o)
Ogre::GLDepthBuffer::isCompatible(Ogre::RenderTarget*) const in libRenderSystem_GLStatic.a(OgreGLDepthBuffer.o)
Ogre::GLFBOMultiRenderTarget::bindSurfaceImpl(unsigned long, Ogre::RenderTexture*) in libRenderSystem_GLStatic.a(OgreGLFBOMultiRenderTarget.o)
Ogre::GLFBOMultiRenderTarget::getCustomAttribute(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, void*) in libRenderSystem_GLStatic.a(OgreGLFBOMultiRenderTarget.o)
"Ogre::GLRenderTexture::CustomAttributeString_TARGET", referenced from:
Ogre::GLPBRenderTexture::getCustomAttribute(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, void*) in libRenderSystem_GLStatic.a(OgreGLPBRenderTexture.o)
Ogre::GLPBRTTManager::unbind(Ogre::RenderTarget*) in libRenderSystem_GLStatic.a(OgreGLPBRenderTexture.o)
Ogre::GLCopyingRenderTexture::getCustomAttribute(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, void*) in libRenderSystem_GLStatic.a(OgreGLCopyingRenderTexture.o)
Ogre::GLCopyingRTTManager::unbind(Ogre::RenderTarget*) in libRenderSystem_GLStatic.a(OgreGLCopyingRenderTexture.o)
"Ogre::GLRenderTexture::CustomAttributeString_GLCONTEXT", referenced from:
Ogre::GLRenderSystem::_createRenderWindow(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned int, unsigned int, bool, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > > const*) in libRenderSystem_GLStatic.a(OgreGLRenderSystem.o)
Ogre::GLRenderSystem::initialiseContext(Ogre::RenderWindow*) in libRenderSystem_GLStatic.a(OgreGLRenderSystem.o)
Ogre::GLRenderSystem::destroyRenderWindow(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libRenderSystem_GLStatic.a(OgreGLRenderSystem.o)
Ogre::GLRenderSystem::_setRenderTarget(Ogre::RenderTarget*) in libRenderSystem_GLStatic.a(OgreGLRenderSystem.o)
Ogre::GLDepthBuffer::isCompatible(Ogre::RenderTarget*) const in libRenderSystem_GLStatic.a(OgreGLDepthBuffer.o)
Ogre::GLPBRenderTexture::getCustomAttribute(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, void*) in libRenderSystem_GLStatic.a(OgreGLPBRenderTexture.o)
Ogre::GLPBRTTManager::GLPBRTTManager(Ogre::GLSupport*, Ogre::RenderTarget*) in libRenderSystem_GLStatic.a(OgreGLPBRenderTexture.o)
...
"Ogre::GLRenderTexture::GLRenderTexture(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Ogre::GLSurfaceDesc const&, bool, unsigned int)", referenced from:
Ogre::GLFBORenderTexture::GLFBORenderTexture(Ogre::GLFBOManager*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Ogre::GLSurfaceDesc const&, bool, unsigned int) in libRenderSystem_GLStatic.a(OgreGLFBORenderTexture.o)
Ogre::GLPBRenderTexture::GLPBRenderTexture(Ogre::GLPBRTTManager*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Ogre::GLSurfaceDesc const&, bool, unsigned int) in libRenderSystem_GLStatic.a(OgreGLPBRenderTexture.o)
Ogre::GLCopyingRenderTexture::GLCopyingRenderTexture(Ogre::GLCopyingRTTManager*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Ogre::GLSurfaceDesc const&, bool, unsigned int) in libRenderSystem_GLStatic.a(OgreGLCopyingRenderTexture.o)
Ogre::GLCopyingRenderTexture::GLCopyingRenderTexture(Ogre::GLCopyingRTTManager*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Ogre::GLSurfaceDesc const&, bool, unsigned int) in libRenderSystem_GLStatic.a(OgreGLCopyingRenderTexture.o)
Ogre::GLCopyingRTTManager::createRenderTexture(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Ogre::GLSurfaceDesc const&, bool, unsigned int) in libRenderSystem_GLStatic.a(OgreGLCopyingRenderTexture.o)
"Ogre::GLTextureCommon::prepareImpl()", referenced from:
vtable for Ogre::GLTexture in libRenderSystem_GLStatic.a(OgreGLTexture.o)
"Ogre::GLTextureCommon::getCustomAttribute(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, void*)", referenced from:
vtable for Ogre::GLTexture in libRenderSystem_GLStatic.a(OgreGLTexture.o)
"Ogre::GLTextureCommon::getBuffer(unsigned long, unsigned long)", referenced from:
vtable for Ogre::GLTexture in libRenderSystem_GLStatic.a(OgreGLTexture.o)
"Ogre::GLSLShaderCommon::unloadImpl()", referenced from:
vtable for Ogre::GLSL::GLSLProgram in libRenderSystem_GLStatic.a(OgreGLSLProgram.o)
"Ogre::GLSLShaderCommon::msCmdAttach", referenced from:
Ogre::GLSL::GLSLProgram::GLSLProgram(Ogre::ResourceManager*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, Ogre::ManualResourceLoader*) in libRenderSystem_GLStatic.a(OgreGLSLProgram.o)
"Ogre::GLSLShaderCommon::loadFromSource()", referenced from:
vtable for Ogre::GLSL::GLSLProgram in libRenderSystem_GLStatic.a(OgreGLSLProgram.o)
"Ogre::GLSLShaderCommon::msMaxOutputVerticesCmd", referenced from:
Ogre::GLSL::GLSLProgram::GLSLProgram(Ogre::ResourceManager*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, Ogre::ManualResourceLoader*) in libRenderSystem_GLStatic.a(OgreGLSLProgram.o)
"Ogre::GLSLShaderCommon::msInputOperationTypeCmd", referenced from:
Ogre::GLSL::GLSLProgram::GLSLProgram(Ogre::ResourceManager*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, Ogre::ManualResourceLoader*) in libRenderSystem_GLStatic.a(OgreGLSLProgram.o)
"Ogre::GLSLShaderCommon::msCmdColumnMajorMatrices", referenced from:
Ogre::GLSL::GLSLProgram::GLSLProgram(Ogre::ResourceManager*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, Ogre::ManualResourceLoader*) in libRenderSystem_GLStatic.a(OgreGLSLProgram.o)
"Ogre::GLSLShaderCommon::msCmdPreprocessorDefines", referenced from:
Ogre::GLSL::GLSLProgram::GLSLProgram(Ogre::ResourceManager*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, Ogre::ManualResourceLoader*) in libRenderSystem_GLStatic.a(OgreGLSLProgram.o)
"Ogre::GLSLShaderCommon::msOutputOperationTypeCmd", referenced from:
Ogre::GLSL::GLSLProgram::GLSLProgram(Ogre::ResourceManager*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, Ogre::ManualResourceLoader*) in libRenderSystem_GLStatic.a(OgreGLSLProgram.o)
"Ogre::GLSLShaderCommon::GLSLShaderCommon(Ogre::ResourceManager*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, Ogre::ManualResourceLoader*)", referenced from:
Ogre::GLSL::GLSLProgram::GLSLProgram(Ogre::ResourceManager*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, Ogre::ManualResourceLoader*) in libRenderSystem_GLStatic.a(OgreGLSLProgram.o)
"Ogre::GLRenderSystemCommon::_makeOrthoMatrix(Ogre::Radian const&, float, float, float, Ogre::Matrix4&, bool)", referenced from:
vtable for Ogre::GLRenderSystem in libRenderSystem_GLStatic.a(OgreGLRenderSystem.o)
"Ogre::GLRenderSystemCommon::_makeProjectionMatrix(Ogre::Radian const&, float, float, float, Ogre::Matrix4&, bool)", referenced from:
vtable for Ogre::GLRenderSystem in libRenderSystem_GLStatic.a(OgreGLRenderSystem.o)
"Ogre::GLRenderSystemCommon::_makeProjectionMatrix(float, float, float, float, float, float, Ogre::Matrix4&, bool)", referenced from:
vtable for Ogre::GLRenderSystem in libRenderSystem_GLStatic.a(OgreGLRenderSystem.o)
"Ogre::GLRenderSystemCommon::_applyObliqueDepthProjection(Ogre::Matrix4&, Ogre::Plane const&, bool)", referenced from:
vtable for Ogre::GLRenderSystem in libRenderSystem_GLStatic.a(OgreGLRenderSystem.o)
"Ogre::GLHardwarePixelBufferCommon::freeBuffer()", referenced from:
Ogre::GLHardwarePixelBuffer::blitFromMemory(Ogre::PixelBox const&, Ogre::Box const&) in libRenderSystem_GLStatic.a(OgreGLHardwarePixelBuffer.o)
Ogre::GLHardwarePixelBuffer::blitToMemory(Ogre::Box const&, Ogre::PixelBox const&) in libRenderSystem_GLStatic.a(OgreGLHardwarePixelBuffer.o)
"Ogre::GLHardwarePixelBufferCommon::unlockImpl()", referenced from:
vtable for Ogre::GLHardwarePixelBuffer in libRenderSystem_GLStatic.a(OgreGLHardwarePixelBuffer.o)
vtable for Ogre::GLTextureBuffer in libRenderSystem_GLStatic.a(OgreGLHardwarePixelBuffer.o)
vtable for Ogre::GLRenderBuffer in libRenderSystem_GLStatic.a(OgreGLHardwarePixelBuffer.o)
"Ogre::GLHardwarePixelBufferCommon::allocateBuffer()", referenced from:
Ogre::GLHardwarePixelBuffer::blitFromMemory(Ogre::PixelBox const&, Ogre::Box const&) in libRenderSystem_GLStatic.a(OgreGLHardwarePixelBuffer.o)
Ogre::GLHardwarePixelBuffer::blitToMemory(Ogre::Box const&, Ogre::PixelBox const&) in libRenderSystem_GLStatic.a(OgreGLHardwarePixelBuffer.o)
"Ogre::GLHardwarePixelBufferCommon::bindToFramebuffer(unsigned int, unsigned int)", referenced from:
vtable for Ogre::GLHardwarePixelBuffer in libRenderSystem_GLStatic.a(OgreGLHardwarePixelBuffer.o)
"Ogre::GLHardwarePixelBufferCommon::upload(Ogre::PixelBox const&, Ogre::Box const&)", referenced from:
vtable for Ogre::GLHardwarePixelBuffer in libRenderSystem_GLStatic.a(OgreGLHardwarePixelBuffer.o)
vtable for Ogre::GLRenderBuffer in libRenderSystem_GLStatic.a(OgreGLHardwarePixelBuffer.o)
"Ogre::GLHardwarePixelBufferCommon::download(Ogre::PixelBox const&)", referenced from:
vtable for Ogre::GLHardwarePixelBuffer in libRenderSystem_GLStatic.a(OgreGLHardwarePixelBuffer.o)
vtable for Ogre::GLRenderBuffer in libRenderSystem_GLStatic.a(OgreGLHardwarePixelBuffer.o)
"Ogre::GLHardwarePixelBufferCommon::lockImpl(Ogre::Box const&, Ogre::HardwareBuffer::LockOptions)", referenced from:
vtable for Ogre::GLHardwarePixelBuffer in libRenderSystem_GLStatic.a(OgreGLHardwarePixelBuffer.o)
vtable for Ogre::GLTextureBuffer in libRenderSystem_GLStatic.a(OgreGLHardwarePixelBuffer.o)
vtable for Ogre::GLRenderBuffer in libRenderSystem_GLStatic.a(OgreGLHardwarePixelBuffer.o)
"Ogre::GLHardwarePixelBufferCommon::GLHardwarePixelBufferCommon(unsigned int, unsigned int, unsigned int, Ogre::PixelFormat, Ogre::HardwareBuffer::Usage)", referenced from:
Ogre::GLHardwarePixelBuffer::GLHardwarePixelBuffer(unsigned int, unsigned int, unsigned int, Ogre::PixelFormat, Ogre::HardwareBuffer::Usage) in libRenderSystem_GLStatic.a(OgreGLHardwarePixelBuffer.o)
Ogre::GLHardwarePixelBuffer::GLHardwarePixelBuffer(unsigned int, unsigned int, unsigned int, Ogre::PixelFormat, Ogre::HardwareBuffer::Usage) in libRenderSystem_GLStatic.a(OgreGLHardwarePixelBuffer.o)
Ogre::GLTextureBuffer::GLTextureBuffer(Ogre::GLSupport&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned int, unsigned int, int, int, Ogre::HardwareBuffer::Usage, bool, unsigned int) in libRenderSystem_GLStatic.a(OgreGLHardwarePixelBuffer.o)
Ogre::GLRenderBuffer::GLRenderBuffer(unsigned int, unsigned int, unsigned int, int) in libRenderSystem_GLStatic.a(OgreGLHardwarePixelBuffer.o)
Ogre::GLRenderBuffer::GLRenderBuffer(unsigned int, unsigned int, unsigned int, int) in libRenderSystem_GLStatic.a(OgreGLHardwarePixelBuffer.o)
"Ogre::GLHardwarePixelBufferCommon::~GLHardwarePixelBufferCommon()", referenced from:
Ogre::GLTextureBuffer::GLTextureBuffer(Ogre::GLSupport&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned int, unsigned int, int, int, Ogre::HardwareBuffer::Usage, bool, unsigned int) in libRenderSystem_GLStatic.a(OgreGLHardwarePixelBuffer.o)
Ogre::GLHardwarePixelBuffer::~GLHardwarePixelBuffer() in libRenderSystem_GLStatic.a(OgreGLHardwarePixelBuffer.o)
Ogre::GLTextureBuffer::~GLTextureBuffer() in libRenderSystem_GLStatic.a(OgreGLHardwarePixelBuffer.o)
Ogre::GLRenderBuffer::GLRenderBuffer(unsigned int, unsigned int, unsigned int, int) in libRenderSystem_GLStatic.a(OgreGLHardwarePixelBuffer.o)
Ogre::GLRenderBuffer::GLRenderBuffer(unsigned int, unsigned int, unsigned int, int) in libRenderSystem_GLStatic.a(OgreGLHardwarePixelBuffer.o)
Ogre::GLRenderBuffer::~GLRenderBuffer() in libRenderSystem_GLStatic.a(OgreGLHardwarePixelBuffer.o)
Ogre::GLRenderBuffer::~GLRenderBuffer() in libRenderSystem_GLStatic.a(OgreGLHardwarePixelBuffer.o)
...
"Ogre::Singleton<Ogre::GLRTTManager>::msSingleton", referenced from:
Ogre::GLRTTManager::GLRTTManager() in libRenderSystem_GLStatic.a(OgreGLRenderSystem.o)
Ogre::GLFBOManager::GLFBOManager(bool) in libRenderSystem_GLStatic.a(OgreGLFBORenderTexture.o)
Ogre::GLRTTManager::GLRTTManager() in libRenderSystem_GLStatic.a(OgreGLFBORenderTexture.o)
Ogre::GLRTTManager::~GLRTTManager() in libRenderSystem_GLStatic.a(OgreGLFBORenderTexture.o)
Ogre::GLFBOManager::GLFBOManager(bool) in libRenderSystem_GLStatic.a(OgreGLFBORenderTexture.o)
Ogre::GLFBOManager::~GLFBOManager() in libRenderSystem_GLStatic.a(OgreGLFBORenderTexture.o)
Ogre::GLPBRTTManager::GLPBRTTManager(Ogre::GLSupport*, Ogre::RenderTarget*) in libRenderSystem_GLStatic.a(OgreGLPBRenderTexture.o)
...
"typeinfo for Ogre::GLRTTManager", referenced from:
typeinfo for Ogre::GLFBOManager in libRenderSystem_GLStatic.a(OgreGLFBORenderTexture.o)
typeinfo for Ogre::GLPBRTTManager in libRenderSystem_GLStatic.a(OgreGLPBRenderTexture.o)
typeinfo for Ogre::GLCopyingRTTManager in libRenderSystem_GLStatic.a(OgreGLCopyingRenderTexture.o)
"typeinfo for Ogre::GLTextureCommon", referenced from:
typeinfo for Ogre::GLTexture in libRenderSystem_GLStatic.a(OgreGLTexture.o)
"typeinfo for Ogre::GLSLShaderCommon", referenced from:
typeinfo for Ogre::GLSL::GLSLProgram in libRenderSystem_GLStatic.a(OgreGLSLProgram.o)
"typeinfo for Ogre::GLRenderSystemCommon", referenced from:
typeinfo for Ogre::GLRenderSystem in libRenderSystem_GLStatic.a(OgreGLRenderSystem.o)
"typeinfo for Ogre::GLHardwarePixelBufferCommon", referenced from:
typeinfo for Ogre::GLHardwarePixelBuffer in libRenderSystem_GLStatic.a(OgreGLHardwarePixelBuffer.o)
"vtable for Ogre::GLRTTManager", referenced from:
Ogre::GLRTTManager::GLRTTManager() in libRenderSystem_GLStatic.a(OgreGLRenderSystem.o)
Ogre::GLFBOManager::GLFBOManager(bool) in libRenderSystem_GLStatic.a(OgreGLFBORenderTexture.o)
Ogre::GLRTTManager::GLRTTManager() in libRenderSystem_GLStatic.a(OgreGLFBORenderTexture.o)
Ogre::GLRTTManager::~GLRTTManager() in libRenderSystem_GLStatic.a(OgreGLFBORenderTexture.o)
Ogre::GLFBOManager::GLFBOManager(bool) in libRenderSystem_GLStatic.a(OgreGLFBORenderTexture.o)
Ogre::GLFBOManager::~GLFBOManager() in libRenderSystem_GLStatic.a(OgreGLFBORenderTexture.o)
Ogre::GLPBRTTManager::GLPBRTTManager(Ogre::GLSupport*, Ogre::RenderTarget*) in libRenderSystem_GLStatic.a(OgreGLPBRenderTexture.o)
...
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"vtable for Ogre::GLTextureCommon", referenced from:
Ogre::GLTextureCommon::~GLTextureCommon() in libRenderSystem_GLStatic.a(OgreGLTexture.o)
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"vtable for Ogre::GLSLShaderCommon", referenced from:
Ogre::GLSL::GLSLProgram::~GLSLProgram() in libRenderSystem_GLStatic.a(OgreGLSLProgram.o)
Ogre::GLSLShaderCommon::~GLSLShaderCommon() in libRenderSystem_GLStatic.a(OgreGLSLProgram.o)
Ogre::GLSL::GLSLProgram::GLSLProgram(Ogre::ResourceManager*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, Ogre::ManualResourceLoader*) in libRenderSystem_GLStatic.a(OgreGLSLProgram.o)
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [ogre] Error 1
make[1]: *** [CMakeFiles/ogre.dir/all] Error 2
make: *** [all] Error 2
Here is my cmake file:
Code: Select all
project(ogre)
cmake_minimum_required(VERSION 2.8)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -std=c++11")
set(ogre_root /Users/edward/Documents/ogre)
set(ogre_libs /Users/edward/Documents/ogre/build/sdk/lib)
set(ogre_include /Users/edward/Documents/ogre/build/sdk/include)
set(ogre_deps_libs /Users/edward/Documents/ogre/dependencies/lib)
set(ogre_deps_include /Users/edward/Documents/ogre/dependencies/include)
FIND_LIBRARY(COCOA_LIB Cocoa)
IF(NOT COCOA_LIB)
MESSAGE(FATAL_ERROR "Cocoa framework not found")
ELSE()
MESSAGE(STATUS "Cocoa framework found. Location: " ${COCOA_LIB})
ENDIF()
FIND_LIBRARY(IOKIT_LIB IOKit)
IF(NOT IOKIT_LIB)
MESSAGE(FATAL_ERROR "IOKit framework not found")
ELSE()
MESSAGE(STATUS "IOKit framework found. Location: " ${IOKIT_LIB})
ENDIF()
FIND_LIBRARY(OPENGL_LIB OpenGL)
IF(NOT OPENGL_LIB)
MESSAGE(FATAL_ERROR "OpenGL framework not found")
ELSE()
MESSAGE(STATUS "OpenGL framework found. Location: " ${OPENGL_LIB})
ENDIF()
FIND_LIBRARY(AGL_LIB AGL)
IF(NOT AGL_LIB)
MESSAGE(FATAL_ERROR "AGL framework not found")
ELSE()
MESSAGE(STATUS "AGL framework found. Location: " ${AGL_LIB})
ENDIF()
include_directories(${ogre_include})
include_directories(${ogre_deps_include})
include_directories(${ogre_root}/build/sdk/include/OGRE)
link_directories(${ogre_root}/build/sdk/lib)
include_directories(${ogre_root}/RenderSystems/GL/include)
link_directories(${ogre_root}/build/sdk/lib)
link_directories(${ogre_root}/build/lib/macosx/Release)
include_directories(${ogre_root}/build/sdk/include/OGRE/Plugins/ParticleFX)
link_directories(${ogre_root}/build/sdk/lib)
include_directories(${ogre_root}/dependencies/include/OIS)
link_directories(${ogre_root}/dependencies/lib/Release)
include_directories(${ogre_root}/dependencies/include/boost)
include_directories(${ogre_root}/dependencies/include)
link_directories(${ogre_root}/dependencies/lib)
include_directories(${ogre_root}/dependencies/include/boost)
link_directories(${ogre_root}/dependencies/lib)
include_directories(${ogre_root}/dependencies/include/freetype)
link_directories(${ogre_root}/dependencies/lib/Release)
include_directories(${ogre_root}/dependencies/include/zzip)
link_directories(${ogre_root}/dependencies/lib/Release)
include_directories(${ogre_root}/dependencies/include)
link_directories(${ogre_root}/dependencies/lib/Release)
include_directories(${ogre_root}/OgreMain/include/OSX)
file(GLOB_RECURSE srcs "src/*.cpp")
file(GLOB_RECURSE hdrs "src/*.h")
add_executable(ogre ${srcs} ${hdrs})
target_link_libraries(ogre
${COCOA_LIB}
${IOKIT_LIB}
${OPENGL_LIB}
${AGL_LIB}
${ogre_libs}/libOgreMainStatic.a
${ogre_libs}/libRenderSystem_GLStatic.a
${ogre_libs}/libPlugin_ParticleFXStatic.a
${ogre_deps_libs}/libboost_system.a
${ogre_deps_libs}/libboost_thread.a
${ogre_deps_libs}/Release/libOIS.a
${ogre_deps_libs}/Release/libfreetype.a
${ogre_deps_libs}/Release/libzziplib.a
${ogre_deps_libs}/Release/libFreeImage.a
)
It's adding
Code: Select all
Ogre::GLPlugin *plugin = new Ogre::GLPlugin();
I've managed to get it to work under Linux so far so this seems a bit strange. If anyone can offer some insight I would be most grateful!