dragonsun00000 2015-07-29 16:39
浏览 38
已采纳

前往:构建时如何显式链接到OS X框架?

When trying to get and build goose on OS X 10.10.3 using go get bitbucket.org/liamstask/goose/cmd/goose I get this error:

Undefined symbols for architecture x86_64:
"_SecKeychainItemExport", referenced from:
  _FetchPEMRoots in 000001.o
"_SecTrustCopyAnchorCertificates", referenced from:
  _FetchPEMRoots in 000001.o
ld: symbol(s) not found for architecture x86_64

I figure this error being due to the Security framework in OS X not being linked. Some possibly related info here: https://github.com/golang/go/issues/11258

So, how can I link to this library explicitly? Or is there something else I am missing?

Thankful for help!

  • 写回答

1条回答 默认 最新

  • doushi1912 2015-07-29 19:21
    关注

    You can pass go build flags to go get. So:

    go get -f -u -ldflags "-framework Security" bitbucket.org/liamstask/goose/cmd/goose
    

    will force the download and link against Security framework.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 stata安慰剂检验作图但是真实值不出现在图上
  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题