I developed a very simple application, using openCV for iOS. It worked fine until I decided to use that code in another project. The new project shows this armv7
error and I can't see where the problem is (please, see the last image).
I created a static lib file with my working code, which has the following architecture info:
Then I compiled it into a *.a
file and added the dyOpenCv.a
and the DyOpenCV.h
files to my main project, which has the following architecture configuration:
But when I try to use the method within the header file DyOpenCV.h
I get the following errors:
Any ideas of what may be wrong?
There were two issues related to linking libraries:
Firstly, although my subproject had the opencv2.framework
correctly added and linked to it, I also had to add the framework
to my main project. This way I got rid of the cv::*
linking
problems;
The second issue was related to my cross-compiling Objective-C++ configuration. Since I was using libc++
as my Standard Library, I had to add -lc++
to my Other Linker Flags. In case you are using libstdc++
as your Standard Library, you should add -lstdc++
instead.
After those changes, it all worked perfectly! Good luck!
I think its because ur project is not linking to the C++ runtime .
Try adding libc++.dylib to ur linked Libraries.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With