且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将Xcode升级到4.5.2并将OpenCV升级到2.4.3后出现链接器错误

更新时间:2023-02-22 21:47:16

因为我似乎无法得到关于版本(既不在这里也不在OpenCV Q& A网站上),我将发布这个作为答案,因为它至少解决了这个问题。这是描述这里



在你的项目中 Build Settings ,请转到 Apple LLVM编译器4.1-Language 部分。

有:

设置 C ++语言方言编译器默认

C ++标准库设置为 libc ++(支持C ++ 11的LLVM C ++标准库)



执行上述操作后,我停止了获取这些链接器错误,而只收到一个错误,表示仅支持iOS 5及更高版本。在项目总结中将部署目标更改为5.0就行了。



最后一点,我还是不确定它是什么意味着,关于OpenCV 2.4.3与5岁以上iOS版本的兼容性。

Since I can't seem to get an answer regarding the versions (neither here nor at the OpenCV Q&A site), I'm going to post this as an answer, as it at least solved the issue. This is described here.

In your project's Build Settings, go down to the section Apple LLVM compiler 4.1-Language.
There:
Set C++ Language Dialect to Compiler Default
Set C++ Standard Libray to libc++ (LLVM C++ standard libray with C++ 11 support

After doing the above, I stopped getting those linker errors, and only got one error instead, which stated that only iOS 5 and above is supported. Changing the Deployment Target to 5.0 in the project summery did the trick.

On a final note, I'm still not sure what it means, regarding OpenCV 2.4.3's compatibility with iOS versions older than 5.