Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined symbols for architecture arm64 #9

Open
neutrum opened this issue Sep 6, 2017 · 8 comments
Open

Undefined symbols for architecture arm64 #9

neutrum opened this issue Sep 6, 2017 · 8 comments

Comments

@neutrum
Copy link

neutrum commented Sep 6, 2017

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 ?

@CocoaBob
Copy link

CocoaBob commented Sep 6, 2017

Does your folder look like this?

@neutrum
Copy link
Author

neutrum commented Sep 6, 2017

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

@CocoaBob
Copy link

CocoaBob commented Sep 6, 2017

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

@neutrum
Copy link
Author

neutrum commented Sep 6, 2017

@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

@CocoaBob
Copy link

CocoaBob commented Sep 6, 2017

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

@mhanlon
Copy link
Contributor

mhanlon commented Sep 13, 2017

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

@GhostFlying
Copy link

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

@mhanlon
Copy link
Contributor

mhanlon commented Sep 23, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants