- This topic has 6 replies, 4 voices, and was last updated 8 years, 11 months ago by
superbigio.
-
AuthorPosts
-
2016-08-24 at 6:58 pm #1137
Hi,
I am pretty new to programming IDEs in Mac,
Trying to setup Vulkan demos..facing below build issue :-
—————————-
Molten-0.13.0/MoltenVK/Demos/LunarG-VulkanSamples/API-Samples/macOS/DemoViewController.mm:16:9: ‘QuartzCore/CAMetalLayer.h’ file not foundDetails :–
————-
OSX Version : 10.11.6 (15G31)
MacBook Pro (Retina, 15-inch, Mid 2014)2016-08-24 at 9:49 pm #1138Starting with a clean Molten 0.13.0 download, and following the instructions, we are not able to replicate this here with either Xcode 7.3.1 (7D1014) or Xcode 8.0 beta 6 (8S201h).
It should not matter, but what version of Xcode are you using? And did you change the Xcode project in any way prior to attempting to build the demo?
…Bill
2016-09-15 at 4:37 am #1143You are likely accidentally building the iOS versions of the product for the simulator, and the simulator does not support Metal.
You either have to build and deploy on actual hardware, or build and deploy for your desktop mac.
2016-09-15 at 6:14 pm #1144Okay, I’m clearly missing something about the framework build. I’m seeing the same issues from the command line.
I use this to compile:
c++ -std=c++14 -I/Users/andrewl/MoltenVK/Molten-0.13.0/MoltenVK/include -o VulkanTest main.cpp -framework Cocoa -F/Users/andrewl/moltenvk/Molten-0.13.0/MoltenVK/macOS -framework MoltenVK -framework MetalThis program:
#include <iostream> #include <vulkan/vulkan.h> int main() { uint32_t extensionCount = 0; vkEnumerateInstanceExtensionProperties(nullptr, &extensionCount, nullptr); std::cout << extensionCount << " extensions supported" << std::endl; }And I get this error:
Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_CAMetalLayer", referenced from: l_OBJC_$_CATEGORY_CAMetalLayer_$_Molten in MoltenVK(MoltenVK-x86_64-master.o) objc-class-ref in MoltenVK(MoltenVK-x86_64-master.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)2016-09-15 at 10:07 pm #1145CAMetalLayeris part of theQuartzCoresystem framework…so you need to link in that framework as well.Unfortunately, the
README_MoltenVK_UserGuide.mddocument does not mention that, which is a documentation oversight.…Bill
2016-09-16 at 1:56 am #1146Bill,
Thanks. That got it. Now I can walk through tutorials.
$ ./VulkanTest
4 extensions supported2016-12-22 at 12:31 pm #1169Hi there,
I had the same problem and managed to solve it thanks to this thread, however it seems that beside the QuartzCore.framework more frameworks are needed in order to successfully compile code using MoltenVK. In my experience also the Foundation.framework and the Metal.framework are needed. I know it’s kind of obvious, however it would be great if the docs could mention those as well. Thanks. -
AuthorPosts
- The forum ‘MoltenVK Support’ is closed to new topics and replies.
