Hello! I’m switching from the Projucer to CMake and I’m getting a weird link error that I don’t know how to solve.
I never had any issue building my project with the Projucer/XCode/Clang and I have other projects on my machine I have no trouble building with CMake.
After fixing many build errors due to the transition, I now get a link error that I have no idea how to solve, specifically:
2022-12-17 15:30:38.219 xcodebuild[1273:14349] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-12-17 15:30:38.219 xcodebuild[1273:14349] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
ld: library not found for -lmany
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I Googled and found similar issues, with different libraries, but can’t find anything about this “lmany”. Also weird that the missing stuff seems related to WatchOS(?).
I tried a bit of everything the first few Google pages suggest, but with no success. These attempts include:
- Reinstalling the Command Tools
- Clean reinstalling XCode
- Building the project on another machine, but getting the same error (this makes me think the issue is specific of my project).
- Having JUCE as subdirectory and globally installed + find_package()
If it can help, I’m on:
- MacOS 12.2.1
- CMake 3.25.1
- Xcode 13.4.1
- Clang 13.1.6
and my project looks something like
jacopo/
CMakeLists.txt root CMakeLists, where I set minimum CMake version, create a main project(JACOPO_MAIN_PROJECT VERSION 0.0.1) and add_subdirectory() submodules/JUCE., common/ and projects/
build/ where I have the cmake builds
common/
CMakeLists.txt just add_subdirectory(src)
src/
jacopo_gui/
jacopo_gui.h
jacopo_gui.cpp
jacopo_gui.mm
and a bunch of .h and .cpp for custom GUI stuff
jacopo_dsp/
jacopo_dsp.h
jacopo_dsp.cpp
jacopo_dsp.mm
and a bunch of .h and .cpp for custom DSP stuff
jacopo_service/
jacopo_service.h
jacopo_service.cpp
jacopo_service.mm
and a bunch of .h and .cpp for custom service stuff (like license check and preset manager)
projects/
CMakeLists.txt just add_subdirectory(project1)
plugin1/
CMakeLists.txt the main CMakeLists for this specific plugin with a project(Plugin1 VERSION 0.0.1) and the rest set up similarly to the AudioPlugin example in JUCE/examples/CMake.
assets/ where I have the plugin assets, added via juce_add_binary_data() and linked to the main Plugin1 project.
source/
PluginProcessor.h
PluginProcessor.cpp
PluginEditor.h
PluginEditor.cpp
submodules/
JUCE/
Anyone had similar issues? I’m completely stuck on this one.
The thing I’m mostly insecure about is having a main project(JACOPO_MAIN_PROJECT VERSION 0.0.1)
and a separate project(Plugin1 VERSION 0.0.1)
for the plugin, but I don’t see how this can create linking issues.
If I try to go back to my Projucer branch, interestingly enough, I can’t build anymore because I’m missing C++ 17!?