解决Swift for TensorFlow编译出错的办法

第一步:设置-O


Build SettingsSwift Compiler-Code GenerationOptimization Level

Optimize for Speed [-O]

解决Swift for TensorFlow编译出错的办法_第1张图片

第二步:添加两个.so静态库


GeneralLinked Frameworks and Libraries
从文件夹中添加libtensorflow.solibtensorflow_framework.so

/Library/Developer/Toolchains/swift-tensorflow-DEVELOPMENT-2018-04-26-a.xctoolchain/usr/lib/swift/macosx/
解决Swift for TensorFlow编译出错的办法_第2张图片

第三步:设置Runpath


Build SettingsLinkingRunpath Search Path:

/Library/Developer/Toolchains/swift-tensorflow-DEVELOPMENT-2018-04-26-a.xctoolchain/usr/lib/swift/macosx

你可能感兴趣的:(解决Swift for TensorFlow编译出错的办法)