Update, I found a project that's mixing C++ and Swift here and I was able to use metal-cpp in its C++ code, so this question is closed.
Post
Replies
Boosts
Views
Activity
Apparently there are 2 header search paths properties in the Xcode target settings - one for the whole project and one for Metal, and I somehow inserted the path to metal-cpp into Metal's property instead of for the whole project. Now it works.
Maybe I’ll just use ImGui, but still any help is appreciated.
Update: my ultimate goal is to create a graphics engine with a metal view and some UI, so I am using C++ with metal-cpp for graphics and SwiftUI for buttons and stuff. But I just can't use metal-cpp with a C++ framework target the way I did with C++ console apps for Mac. Am I doing something wrong? Is there a way to point Xcode to use the .hpp files in metal-cpp and metal-cpp-extensions folders? I set the header search paths for the C++ framework target, but it doesn't work... Any help is much appreciated 🙏
Update: I also got this message on the line #include <Fuondation/Foundation.hpp>:
Did not find header 'Foundation.hpp' in framework 'Foundation' (loaded from '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/System/Library/Frameworks')