ERROR: Non-Existent libOgreMainStatic.a File While Building OGRE Project

Problems building or running the engine, queries about how to use features etc.
Post Reply
_asdesc
Gnoblar
Posts: 2
Joined: Sun Feb 03, 2019 4:24 am

ERROR: Non-Existent libOgreMainStatic.a File While Building OGRE Project

Post by _asdesc »

Ogre Version: :1.11.5:
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
)

User avatar
saintnick
Halfling
Posts: 51
Joined: Tue Nov 27, 2018 1:41 am
x 5

Re: ERROR: Non-Existent libOgreMainStatic.a File While Building OGRE Project

Post by saintnick »

First of all I don't use MacOS so I can't follow along building.

I don't think you built Ogre completely if you are missing libOgreMainStatic.a. Reading the link you gave says to build Ogre with XCode. Was this step completed?
_asdesc
Gnoblar
Posts: 2
Joined: Sun Feb 03, 2019 4:24 am

Re: ERROR: Non-Existent libOgreMainStatic.a File While Building OGRE Project

Post by _asdesc »

Thanks for the response! I built OGRE.xcodeproj with the ALL_BUILD scheme, and then switched schemes to install and built it again (both set to release config). Is there another step I need to do?
Post Reply