V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
The Go Programming Language
http://golang.org/
Go Playground
Go Projects
Revel Web Framework
SlipStupig
V2EX  ›  Go 编程语言

MacOS 环境下 CGO 库依赖编译错误

  •  
  •   SlipStupig · 2020-11-30 17:34:59 +08:00 · 1293 次点击
    这是一个创建于 1235 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我使用 CGO 编译一个程序,以前挺正常的自从装了 Xcode 后就编译异常,然后我卸载了 Xcode 之后就 CGO 编译不过了。报错内容为:

    ld: library not found for -lvpx
    clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
    

    我开始以为是 brew 安装的问题,后来我改成手动安装一样不行:

    ld: warning: platform not specified
    ld: warning: -arch not specified
    ld: warning: No platform min-version specified on command line
    ld: warning: ignoring file /usr/local/lib/libvpx.dylib, building for -unknown but attempting to link with file built for macOS-x86_64
    Undefined symbols for architecture unknown:
      "_main", referenced from:
         implicit entry/start for main executable
    ld: symbol(s) not found for architecture unknown
    
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3544 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 04:58 · PVG 12:58 · LAX 21:58 · JFK 00:58
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.