【问题标题】:ld warning in mac terminal using skm and c++ compiler使用 skm 和 c++ 编译器的 mac 终端中的 ld 警告
【发布时间】:2021-06-09 23:43:30
【问题描述】:

我在使用 Mac 终端和 skm 库用 C++ 编译一个简单的 hello world 程序时收到此警告。我是新手,所以不太确定该怎么做。

ld: warning: dylib (/Users/chriscommon/.splashkit/lib/macos/libSplashKit.dylib) was built for newer macOS version (10.15.4) than being linked (10.15)
ld: warning: object file (/Users/chriscommon/.splashkit/clang++/lib/macos/libSplashKitCpp.a(splashkit.cpp.o)) was built for newer macOS version (10.15.4) than being linked (10.15)
ld: warning: object file (/Users/chriscommon/.splashkit/clang++/lib/macos/libSplashKitCpp.a(adapter_type_mapper.cpp.o)) was built for newer macOS version (10.15.4) than being linked (10.15)

有谁知道我是否可以通过某种方式解决此问题,以便链接到正确的版本?我正在运行 macOS10.15.7 并尝试更新 skm,重新安装 Xcode 命令行工具等,该程序最终可以运行,但每次编译时都会出现警告。

【问题讨论】:

    标签: c++ xcode macos terminal


    【解决方案1】:

    在构建程序时尝试将此标志添加到 Xcode:

    -mmacosx-version-min=11.0
    

    【讨论】:

      猜你喜欢
      • 2020-03-15
      • 1970-01-01
      • 2015-11-18
      • 1970-01-01
      • 2015-11-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-12-23
      相关资源
      最近更新 更多