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 用verilog实现tanh函数和softplus函数
  • ¥15 Hadoop集群部署启动Hadoop时碰到问题
  • ¥15 求京东批量付款能替代天诚
  • ¥15 slaris 系统断电后,重新开机后一直自动重启
  • ¥15 QTableWidget重绘程序崩溃
  • ¥15 谁能帮我看看这拒稿理由啥意思啊阿啊
  • ¥15 关于vue2中methods使用call修改this指向的问题
  • ¥15 idea自动补全键位冲突
  • ¥15 请教一下写代码,代码好难
  • ¥15 iis10中如何阻止别人网站重定向到我的网站