My project worked perfectly until this morning. I used xcode 4.3 and an older version of OpenCV (I'm not sure about the exact version). OSX was already 10.7.x but not 10.7.5
Today, after updating OSX to 10.7.5, xcode to 4.5.2 and downloading OpenCV 2.4.3, I get the following linker errors when trying to build a project:
Undefined symbols for armv7 architecture:
"_OBJC_CLASS _ $ _ ALAssetsLibrary" referenced by:
objc-class-ref in opencv2 (cap_ios_video_camera.o)
"cv :: FeatureDetector :: create (std :: string const &)" referenced by:
- [ImageAnalyzer detectBlobs:] in ImageAnalyzer.o
"cv :: FeatureDetector :: detect (cv :: Mat const &, std :: vector> &, cv :: Mat const &) const" referenced:
- [ImageAnalyzer detectBlobs:] in ImageAnalyzer.o
ld: character not found for armv7 architecture
clang: error: linker command did not work with exit code 1 (use -v to call the call)
To use the new opencv structure, I removed the link to the old framework and referenced the project on the previously prepared opencv2.framework, downloaded from here .
I also removed the link to libz.dylib and added the link to libC ++. Dylib .
The last step was to update the prefix file to a new structure. The corresponding part in the prefix file now looks like this:
#ifdef __cplusplus #import <opencv2/opencv.hpp> #endif
It all narrowed down to these 4 linker errors that I can't get rid of. I tried using libstdc ++. Dylib , but I get even more errors. I also tried to create OpenCV myself, as explained here , but I still get the same errors as the pre-built infrastructure.
What am I missing? Is there anything else I need to change in my project?
UPDATE:
As you can see here , setting the "C ++ standard library" to "libC ++ (LLVM C ++ standard libray with C ++ 11 support" gave only one error:
clang: error: invalid deployment target for -stdlib = libC ++ (requires iOS 5.0 or later)
Changing the deployment target on iOS 5 finally launched my project.
Does this mean that OpenCV 2.4.3 does not work on iOS versions older than 5?
ios xcode opencv linker-errors
Darkshore Grouper Dec 25 '12 at 12:11 2012-12-25 12:11
source share