ARuler icon indicating copy to clipboard operation
ARuler copied to clipboard

Undefined symbols for architecture arm64

Open neutrum opened this issue 8 years ago • 8 comments

Hey, I am having trouble building your app I am using following setup: Xcode Version 9.0 beta 6 (9M214v) opencv 3.2.0 (I reimported it as suggested)

but i am still getting this error:

Undefined symbols for architecture arm64: "cv::String::deallocate()", referenced from: cv::String::~String() in PlaneDetector.o cv::String::operator=(cv::String const&) in PlaneDetector.o "_cvGEMM", referenced from: cvFitPlane(CvMat const*, float*) in PlaneDetector.o "_cvSVD", referenced from: cvFitPlane(CvMat const*, float*) in PlaneDetector.o "_cvSet", referenced from: cvFitPlane(CvMat const*, float*) in PlaneDetector.o "_cvReleaseMat", referenced from: cvFitPlane(CvMat const*, float*) in PlaneDetector.o "_cvCreateMat", referenced from: +[PlaneDetector detectPlaneWithPoints:] in PlaneDetector.o cvFitPlane(CvMat const*, float*) in PlaneDetector.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

As I understand it this is symbols are referenced from the opencv library which does have arm64 references.

So where could be the problem ?

neutrum avatar Sep 06 '17 14:09 neutrum

Does your folder look like this?

CocoaBob avatar Sep 06 '17 14:09 CocoaBob

@CocoaBob No it does not but I see your point now it cannot find the real .a library How should I fix it seem that the iOS pack from the opencv website is not enough.

neutrum avatar Sep 06 '17 14:09 neutrum

@neutrum I don't know how you imported OpenCV, actually we only need to download the version 3.2 from here and simply copy the binary file opencv2 (140.8MB) to the ARuler project folder.

CocoaBob avatar Sep 06 '17 14:09 CocoaBob

@CocoaBob Ok so just copying the opencv2.framework to project wasn't enough I had to manually add it in Build Phases > Link Binary with Libraries and now it works thanks

neutrum avatar Sep 06 '17 14:09 neutrum

@neutrum Strange, it was already there when we clone/download the project.

CocoaBob avatar Sep 06 '17 14:09 CocoaBob

If you update to the latest you can get opencv installed with Cocoapods...

mhanlon avatar Sep 13 '17 07:09 mhanlon

@mhanlon But I clone the latest one and run pod install to install the opcnv2 but it can not find the opencv2/swiching.hpp

GhostFlying avatar Sep 23 '17 08:09 GhostFlying

@GhostFlying, once you run pod install you need to use the ARuler.xcworkspace (not ARuler.xcodeproj) to build and run the project... That should fix the error you're seeing.

mhanlon avatar Sep 23 '17 21:09 mhanlon