【问题标题】:MTLRenderPipelineAttachmentDescriptor swift linker errorMTLRenderPipelineAttachmentDescriptor 快速链接器错误
【发布时间】:2014-07-01 07:55:42
【问题描述】:

我有链接器错误:

架构 arm64 的未定义符号: _OBJC_CLASS_$_MTLRenderPipelineAttachmentDescriptorArray

以下代码

var pipelineStateDescriptor = MTLRenderPipelineDescriptor()
pipelineStateDescriptor.label = "Test1"
pipelineStateDescriptor.sampleCount = 1
pipelineStateDescriptor.vertexFunction = vertexFunction
pipelineStateDescriptor.fragmentFunction = fragmentFunction

var colorDescriptor = MTLRenderPipelineAttachmentDescriptor()
colorDescriptor.pixelFormat = .FormatBGRA8Unorm

pipelineStateDescriptor.colorAttachments[0] = colorDescriptor

有什么解决办法吗?

【问题讨论】:

    标签: swift ios8 metal


    【解决方案1】:

    更新: 这个错误在 ios8 beta 3 中不再存在。

    在您的项目构建设置中,将“优化级别”设置为“-Ofast”,如下所示

    这里是关于编译器优化标志的简短信息

    这似乎是 beta sdk 的一个错误。我做了一个项目,我尝试在 Swift 中使用 Metal,去看看https://github.com/haawa799/METAL_Playground

    希望它会有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-04-11
      • 1970-01-01
      • 2018-11-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-17
      • 1970-01-01
      相关资源
      最近更新 更多