我只是想在 Xcode 中运行示例 SFML 程序。我让它编译但它不运行。它立即崩溃并将其打印到控制台:
dyld: Library not loaded: @rpath/sfml-system.framework/Versions/2.5.1/sfml-system
Referenced from: /Users/fabiosuarez/Library/Developer/Xcode/DerivedData/Minesweeper-akxearyxdvvgahfbqsxchcqyauxw/Build/Products/Debug/Minesweeper.app/Contents/MacOS/Minesweeper
Reason: no suitable image found. Did find:
/Library/Frameworks/sfml-system.framework/Versions/2.5.1/sfml-system: code signature in (/Library/Frameworks/sfml-system.framework/Versions/2.5.1/sfml-system) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
环境:
- IDE: Xcode 11.2.1
- OS: macOS Catalina 10.15.1
- Shell: zsh 5.7.1 (x86_64-apple-darwin19.0)
注意:这是针对我们必须制作 Minesweepeer 的项目,因此 Xcode 项目的名称是“Minesweeper”,但所有代码都是默认的 SFML 应用程序代码。
最佳答案
这里的“使用库验证”是重要的线索。你需要disable that using the "Disable Library Validation" entitlement
关于c++ - 使用 Xcode 11 和 macOS Catalina (zsh) 编译后 SFML 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58995630/