You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compilation on my mac won't work unless I append the explicit std version flag -std=c++2b to the makefile CXXFlags.
It trips up on a constexpr constructor.
-> clang --version
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin23.1.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
After fixing that and trying to run the glfw/opengl3 backend it errors on an incorrect linking call to ld.
➜ example_glfw_opengl3 git:(docking_inter) ✗ make
[ 59%] Built target glfw
[ 62%] Building CXX object CMakeFiles/cimgui.dir/Users/sugar/code/cimgui/cimgui.cpp.o
[ 66%] Linking CXX shared library libcimgui.dylib
ld: library not found for -lGL
clang: error: linker command failed with exit code 1 (use -v to see invocation)
For macos (m1 atleast) it should be -framework OpenGL to link opengl
EDIT2:
OK I got the example to build by changing the CMake OpenGL linking logic for macos to:
find_library(OPENGL OpenGL)
if (NOT OPENGL)
message(FATAL_ERROR "OPENGL not found")
endif()
target_link_libraries(${PROJECT_NAME} ${OPENGL})
apparently find_library has special handling for macos
EDIT3:
Ah ok, so the backend_test example build processes will output a dll with the backend symbols exported. I get it now.
The text was updated successfully, but these errors were encountered:
Compilation on my mac won't work unless I append the explicit std version flag
-std=c++2b
to the makefile CXXFlags.It trips up on a constexpr constructor.
After fixing that and trying to run the glfw/opengl3 backend it errors on an incorrect linking call to ld.
For macos (m1 atleast) it should be -framework OpenGL to link opengl
EDIT2:
OK I got the example to build by changing the CMake OpenGL linking logic for macos to:
apparently find_library has special handling for macos
EDIT3:
Ah ok, so the backend_test example build processes will output a dll with the backend symbols exported. I get it now.
The text was updated successfully, but these errors were encountered: