ios 6 and xcode 4.5 linker problems

http://answers.opencv.org/question/2868/ios-6-and-xcode-45-linker-problems/

st*, unsigned long)", referenced from:
      cv::BmpDecoder::BmpDecoder() in opencv2(grfmt_bmp.o)
      cv::BmpEncoder::BmpEncoder() in opencv2(grfmt_bmp.o)
      cv::BmpEncoder::newEncoder() const in opencv2(grfmt_bmp.o)
      cv::PxMEncoder::PxMEncoder() in opencv2(grfmt_pxm.o)
      cv::PxMEncoder::newEncoder() const in opencv2(grfmt_pxm.o)
      cv::SunRasterDecoder::SunRasterDecoder() in opencv2(grfmt_sunras.o)
      cv::SunRasterEncoder::SunRasterEncoder() in opencv2(grfmt_sunras.o)
.......
  "std::cout", referenced from:
      cv::LDA::lda(cv::_InputArray const&, cv::_InputArray const&) in opencv2(lda.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Showing first 200 notices only

I have only added the generated opencv2.framework to my project and added:

#ifdef __cplusplus
    #import <opencv2/opencv.hpp>
#endif

At the beginning of my *-Prefix.pch file

Any idea what could be the problem?

Thank you!

2 Answers

Sort by » oldest newest most voted
1

answered Dec 3 '12

John Brewer gravatar image John Brewer
51   2  5 

It looks like your project is not linking against the C++ runtime library. To link against the runtime library:

  • Go to the "Build Phases" tab of the project .
  • Choose the "Link Binary With Libraries" section.
  • Click the "+" button at the bottom of the section.
  • From the list that appears, choose either "libc++.dylib" for OpenCV 2.4.3, or "libstdc++.dylib" for OpenCV 2.4.2 and before.

Rebuild, and everything should work.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值