Operating System: :macOS High Sierra:
Render System:
Hi All,
First post!
I've been working on setting OGRE following this tutorial:
http://wiki.ogre3d.org/Building+Ogre3D+ ... osemite%29 (I have C++ experience, but not with CMake or ogre), while updating the relevant parts to 1.11.5 and C++14.
I've incompetently stumbled through to the final step, but I found an error that I can't figure out.
The error:
error: No rule to make target `/opt/dev/ogre3d-1.11.5/build/sdk/lib/libOgreMainStatic.a', needed by `test.app/Contents/MacOS/test'. Stop.
I've done some basic debugging, and I've checked to confirm a few things. Both the /opt/dev/ogre3d-1.11.5/build/sdk/include/OGRE and /opt/dev/ogre3d-1.11.5/build/sdk/lib exist. If I comment out the INCLUDE_DIRECTORIES line, the error goes away, but it obviously can't find the header. /opt/dev/ogre3d-1.11.5/build/sdk/lib/libOgreMainStatic.a does not exist, and no file called libOgreMainStatic.a exists anywhere on my system. However, libOgreGLSupportStatic.a exists in the given location. I've looked up the error, and it told me what I already knew: the error means the referenced file does not exist.
Based on the results I have found googling the error, I am guessing I made a really dumb mistake, or there is version incompatibility. Would someone mind checking if the given file exists in their system, or suggest a fix if this error is something you have seen before?
Thanks!
Code: Select all
project(test)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -std=c++14")
SET(OGRE_DIR "/opt/dev/ogre3d-1.11.5/build/sdk/CMake")
INCLUDE_DIRECTORIES(/opt/dev/ogre3d-1.11.5/build/sdk/include/OGRE)
LINK_DIRECTORIES(/opt/dev/ogre3d-1.11.5/build/sdk/lib)
FILE(GLOB_RECURSE SRCS "${PROJECT_SOURCE_DIR}/src/*.cpp")
FILE(GLOB_RECURSE HDRS "${PROJECT_SOURCE_DIR}/src/*.h")
ADD_EXECUTABLE(${PROJECT_NAME} MACOSX_BUNDLE ${SRCS} ${HDRS})
TARGET_LINK_LIBRARIES(
${PROJECT_NAME}
/opt/dev/ogre3d-1.11.5/build/sdk/lib/libOgreMainStatic.a
)