pkmital / Real-Time-Object-Detection

real time object detection using opencv and simple UI to select the object to track
http://pkmital.com
37 stars 30 forks source link

Compile on ios #1

Open hffmnn opened 12 years ago

hffmnn commented 12 years ago

Hello,

I'm trying to compile for ios, with actual Xcode 4.2, ios SDK 5.0, based on the openCV-Example code from openFrameworks (which compiles fine btw). This gives me the following linker errors: ld: warning: ignoring file ../../../addons/ofxOpenCv/libs/opencv/lib/osx/opencv.a, missing required architecture armv7 in file Undefined symbols for architecture armv7: "ZN2cv4SIFT14DetectorParamsC1Ev", referenced from: ZN2cv15FeatureDetector6createERKSs in opencv.a(detectors.o) "ZN2cv4SIFTC1Edbbiiii", referenced from: ZN2cv23SiftDescriptorExtractor4readERKNS_8FileNodeE in opencv.a(descriptors.o) ZN2cv19DescriptorExtractor6createERKSs in opencv.a(descriptors.o) "ZNK2cv4SIFTclERKNS_3MatES3_RSt6vectorINS_8KeyPointESaIS5_EERS1_b", referenced from: ZNK2cv23SiftDescriptorExtractor11computeImplERKNS_3MatERSt6vectorINS_8KeyPointESaIS5EERS1 in opencv.a(descriptors.o) "ZNK2cv4SIFTclERKNS_3MatES3_RSt6vectorINS_8KeyPointESaIS5_EE", referenced from: ZNK2cv19SiftFeatureDetector10detectImplERKNS_3MatERSt6vectorINS_8KeyPointESaIS5EES3 in opencv.a(detectors.o) "ZN2cv4SIFT12CommonParamsC1Ev", referenced from: ZN2cv15FeatureDetector6createERKSs in opencv.a(detectors.o) ZN2cv19DescriptorExtractor6createERKSs in opencv.a(descriptors.o) "ZN2cv4SIFTC1Eddiiii", referenced from: ZN2cv19SiftFeatureDetector4readERKNS_8FileNodeE in opencv.a(detectors.o) ZN2cv15FeatureDetector6createERKSs in opencv.a(detectors.o) "ZN2cv4SIFT16DescriptorParamsC1Ev", referenced from: __ZN2cv19DescriptorExtractor6createERKSs in opencv.a(descriptors.o) ld: symbol(s) not found for architecture armv7

Do you have a working example for mobile?

Regards, sunatmidnight

pkmital commented 12 years ago

try dragging this file into the project: addons/ofxOpenCv/libs/opencv/lib/iphone/opencv.a

hffmnn commented 12 years ago

This does not work and gives the same errors. As I said: This project works with the openCV addon example, so the opencv.a is linked in correctly.

pkmital commented 12 years ago

What version openframeworks do you have? Does the OSX version of the opencv.a have the symbols required to run the program (ones defined in detectors.o, part of features2d.hpp), or is it only the iphone version of opencv.a?

hffmnn commented 12 years ago

It's the openFrameworks download version from the website. Your code runs perfect on desktop, but not on ios.