Closed AboudFayad closed 2 years ago
Hi, sorry about this. The integration code was not yet upgraded to work with latest ImGui versions and this seems to be caused by new macOS clipboard support in 1.71 (https://github.com/ocornut/imgui/pull/2546). Until I fix this and link the missing framework, can you build with an older version of ImGui? The code was tested extensively with 1.69, 1.70 could work too.
Thanks a lot, 1.69 works just fine.
If there is a need to use the latest version of imgui you can add the Carbon library to your CMakeLists and that should fix the error:
if(APPLE)
find_library(CARBON_LIBRARY Carbon)
endif()
# Add ${CARBON_LIBRARY} to your target_link_libraries()
EDIT: Or even better: just add "-framework ApplicationServices" to target_link_libraries()
Should be fixed with b157344afcbff29d20b36a80a999c28329e7bf8c -- to make it work, please update the FindImGui.cmake
copy in your projects.
Note as as-per https://github.com/ocornut/imgui/commit/29d9394a41939e8d033814704d5e9bcca516bf37 and https://github.com/ocornut/imgui/pull/2546#issuecomment-513613672 I have reverted this change. It is possible to explicitely enabled the default cocoa handler by using IMGUI_ENABLE_OSX_DEFAULT_CLIPBOARD_FUNCTIONS
, as a facility for custom engine writers on the Mac.
....That wasn't explicit in the message above, but it means you may revert linking to ApplicationServices... Magnum probably has its own clipboard handler anyway.
@ocornut thanks a lot for taking the time to comment! :green_heart:
I'll keep it around for now so people using 1.71 don't run into the same issue again, will remove it a few releases later.
I decided to just link to ApplicationServices always, as it's no additonal hurdle on our side and it's nicer to users. Internal TODO removed in 4e99409a8da6df09c64ab114101515603fcb392a.
I am trying to build the magnum integration with imgui on mac, but the build always fails with the following error:
which are windows specific functions, I tried building it on windows the same way I did on mac and it worked. So I believe it is a mac specific issue.
Anyway to overcome this issue?