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
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.