I’m making an attempt to do the instance within the url : https://metaltutorial.com/Lessonpercent201percent3Apercent20Hellopercent20Metal/1.%20Hellopercent20Window/
Downside is, I get hyperlink errors comparable to :
: && /Functions/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -g -arch arm64 -isysroot /Functions/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/ElevationMetal.dir/MetalView.mm.o CMakeFiles/ElevationMetal.dir/elevationmetal_main.mm.o -o ElevationMetal -L/choose/homebrew/Cellar/glfw/3.4/lib -Wl,-rpath,/choose/homebrew/Cellar/glfw/3.4/lib -framework Basis -framework AppKit -framework QuartzCore -framework CoreGraphics -framework Metallic -framework MetalKit -lglfw && :
Undefined symbols for structure arm64:
"NS::Personal::Selector::s_krelease", referenced from:
MetalView::cleanup() in MetalView.mm.o
"MTL::CreateSystemDefaultDevice()", referenced from:
MetalView::initDevice() in MetalView.mm.o
ld: image(s) not discovered for structure arm64
c++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: construct stopped: subcommand failed.
The above output is from builiding with cmake. I’ve added the apple frameworks to the construct file with :
find_library(METAL Metallic)
if (NOT METAL)
message(ERROR "Metallic not discovered")
endif ()
I added QuartzCore, Metallic and Basis. I then set the hyperlink libs on the goal with :
target_link_libraries(ElevationMetal
${FOUNDATION}
${APPKIT}
${QUARTZCORE}
${COREGRAPHICS}
${METAL}
${METALKIT}
-lglfw
)
I searched on-line for the fitting method of together with these frameworks in a cmake construct file, and got here up with the above methodology.
I then switched to utilizing Xcode.app, and created an identical undertaking following the directions additionally in : https://developer.apple.com/steel/cpp/
However I get the identical outcomes. Which leads me to assume that metal-cpp which is c++ shouldn’t be dealing effectively with Metallic which is Goal C.
Assist appreciated on the hyperlink errors.
Thanks,
Regards