Ogre Version: :14.3/master:
Operating System: :Windows10/Msys2-Clang64/clang++ 18:
I compiled my own library in Release mode according to the tutorial, but an exception occurred at ctx.initApp() when compiling the example file.
I tried to debug it with lldb, but there was not much useful information.
I can see that the exception is triggered by _openFileStream, but the exception message does not include the target path. It is even reported in my system language (not English), meaning is: "The specified image file does not contain a resource areaso". I have no idea what file it is trying to load. lldb also returns assembly (not source code), and I have little experience in C++ and cannot solve this problem.
I guessed that this was caused by the resource path specified in resources.cfg not existing. I did a lot of different tests, but none of them worked.
CMakeLists.txt:
Code: Select all
cmake_minimum_required(VERSION 3.10)
project(ogre_test)
set(OGRE_DIR "D:/lch/Source/ogre/build/sdk/CMake/")
set(CMAKE_CXX_STANDARD 17)
# statically link the standard library provided by msys
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
## [discover_ogre]
# The COMPONENTS part checks that OGRE was built the way we need it
# The CONFIG flag makes sure we get OGRE instead of OGRE-next
find_package(OGRE REQUIRED COMPONENTS Bites CONFIG)
# add the source files as usual
add_executable(0_Bootstrap Bootstrap.cpp)
# this also sets the includes and pulls third party dependencies
target_link_libraries(0_Bootstrap OgreBites)
## [discover_ogre]