ios - 如何在 0.9.1+ 版本中链接到适用于 iOS 的 libcinder.a?
问题描述
从这里交叉发布,以防我能得到更多的眼球。
我正在回到我在 0.9 之前开发的旧 iOS 应用程序上,并且我在更新所有内容以使用 Cinder 0.9.2 和 C++14(婴儿步骤……)方面取得了一些进展。现在,我在链接方面遇到了相当大的障碍——事实上,不仅仅是我的应用程序,还有几乎所有适用于 iOS 的示例。
我曾经链接到那些libcinder.a
居住在lib/ios/
其中的静态库(),据我所知,这些库现在应该有自己的目录Release
和Debug
目录。但是,我似乎找不到任何这些,而且我不知道如何检索它们。即使我从网站下载了 zip,我是否应该从源代码编译库?
抱歉,这一定很明显,但不幸的是,在 0.9.0 版本之后我并没有太多接触 Cinder :(
编辑我尝试了一个fullbuild.sh
以防万一,我最终得到了下面的内容。所以看起来 macOS 构建很顺利,但 iOS 没有。我应该说,这是在 Catalina 上使用 Xcode 11.7。
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project /Users/morpheu5/src/cinder_0.9.2_mac/proj/xcode/cinder.xcodeproj -target cinder_iphone -configuration Release -sdk iphoneos
Build settings from command line:
SDKROOT = iphoneos13.7
note: Using new build system
note: Planning build
note: Constructing build description
error: AppKit is not available when building for iOS. (in target 'cinder_iphone' from project 'cinder')
error: Cocoa is not available when building for iOS. (in target 'cinder_iphone' from project 'cinder')
** BUILD FAILED **
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project /Users/morpheu5/src/cinder_0.9.2_mac/proj/xcode/cinder.xcodeproj -target cinder_iphone -configuration Debug -sdk iphoneos
Build settings from command line:
SDKROOT = iphoneos13.7
note: Using new build system
note: Planning build
note: Constructing build description
error: AppKit is not available when building for iOS. (in target 'cinder_iphone' from project 'cinder')
error: Cocoa is not available when building for iOS. (in target 'cinder_iphone' from project 'cinder')
** BUILD FAILED **
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project /Users/morpheu5/src/cinder_0.9.2_mac/proj/xcode/cinder.xcodeproj -target cinder_iphone_sim -configuration Release -sdk iphonesimulator
Build settings from command line:
SDKROOT = iphonesimulator13.7
note: Using new build system
note: Planning build
note: Constructing build description
warning: Product libcinder.a cannot weak-link framework CoreVideo.framework (in target 'cinder_iphone_sim' from project 'cinder')
warning: Product libcinder.a cannot weak-link framework AVFoundation.framework (in target 'cinder_iphone_sim' from project 'cinder')
warning: Product libcinder.a cannot weak-link framework CoreMedia.framework (in target 'cinder_iphone_sim' from project 'cinder')
warning: Product libcinder.a cannot weak-link framework CoreVideo.framework (in target 'cinder_iphone_sim' from project 'cinder')
warning: Product libcinder.a cannot weak-link framework AVFoundation.framework (in target 'cinder_iphone_sim' from project 'cinder')
warning: Product libcinder.a cannot weak-link framework CoreMedia.framework (in target 'cinder_iphone_sim' from project 'cinder')
error: AppKit is not available when building for iOS Simulator. (in target 'cinder_iphone_sim' from project 'cinder')
error: Cocoa is not available when building for iOS Simulator. (in target 'cinder_iphone_sim' from project 'cinder')
error: QTKit is not available when building for iOS Simulator. (in target 'cinder_iphone_sim' from project 'cinder')
** BUILD FAILED **
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project /Users/morpheu5/src/cinder_0.9.2_mac/proj/xcode/cinder.xcodeproj -target cinder_iphone_sim -configuration Debug -sdk iphonesimulator
Build settings from command line:
SDKROOT = iphonesimulator13.7
note: Using new build system
note: Planning build
note: Constructing build description
warning: Product libcinder.a cannot weak-link framework CoreVideo.framework (in target 'cinder_iphone_sim' from project 'cinder')
warning: Product libcinder.a cannot weak-link framework AVFoundation.framework (in target 'cinder_iphone_sim' from project 'cinder')
warning: Product libcinder.a cannot weak-link framework CoreMedia.framework (in target 'cinder_iphone_sim' from project 'cinder')
warning: Product libcinder.a cannot weak-link framework CoreVideo.framework (in target 'cinder_iphone_sim' from project 'cinder')
warning: Product libcinder.a cannot weak-link framework AVFoundation.framework (in target 'cinder_iphone_sim' from project 'cinder')
warning: Product libcinder.a cannot weak-link framework CoreMedia.framework (in target 'cinder_iphone_sim' from project 'cinder')
error: AppKit is not available when building for iOS Simulator. (in target 'cinder_iphone_sim' from project 'cinder')
error: Cocoa is not available when building for iOS Simulator. (in target 'cinder_iphone_sim' from project 'cinder')
error: QTKit is not available when building for iOS Simulator. (in target 'cinder_iphone_sim' from project 'cinder')
** BUILD FAILED **
解决方案
问题在于项目的配置方式。这个 PR为我解决了这个问题,我能够重建 Cinder,一切都在正确的位置。
推荐阅读
- python - 如何使用 grequests 检索 html
- haskell - 为 NonEmpty 编写 Monad 和 Traversable 实例
- javascript - TypeError:Rich Embed 不是我的 poll 命令的构造函数
- c# - 应该向哪个项目添加 LibVLC 依赖项?
- python - Sqlalchemy 多线程
- jax-rs - Spring + RESTEasy 子资源未注入依赖项
- php - PHP 仅从内容中提取 id 值
- excel - 选择行中的最后一个空白单元格
- python-2.7 - access denied for python command os.system
- serialization - Serde 使用远程对象的代理类型进行序列化