-
Notifications
You must be signed in to change notification settings - Fork 866
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 references with gomobile and abi-armeabi-v7a #235
Comments
Hello @ogero I have not done anything at all with gomobile, but this looks very interesting. From the error message, it makes me wonder if the |
Hi @deadprogram, unfortunately I described my environment wrong, I've updated the compiler used -hope you didn't read that part too thoroughly-, and added a large chunk of info displayed by CMake before generating the makefile. About the Coincidentally all undefined referenced functions have as parameters some But instead, I found: I have very little knowledge about STL, compilers and linkers, but it seems that somehow, the |
Looks like that might be related this this https://stackoverflow.com/questions/37370259/undefined-reference-to-cvcascadeclassifierdetectmultiscale-but-other-lib |
Yes, it seems to be related to STL. Thanks for that link, I don't know how I haven't seen it before! The cmake file
So it seems -because of reasons- (Is not available for standalone toolchain./Silently degrades to gnustl_static if not available.) i'm not able to use other than gnustl_static... I'll give it another try, overriding the cmake var |
Just wondering if this is also related? opencv/opencv#8742 It would probably be worthwhile for you to look thru the various issues on the OpenCV repo itself @ogero to see if any clues there. |
Last attempt: My next compile of Thanks again for that discovery @deadprogram . |
Ok, hold my chair! Gomobile now correctly linked the opencv shared libs and generated an AAR for android
Now its time for me to try out some opencv apis, and try to generate a fat single shared lib while leaving out unused modules. @deadprogram thank you so much for all the help provided. |
Hi, i'm trying to use gocv with gomobile and Android, but in the last step (gomobile binding), I get some undefined references on
cv::DescriptorMatcher::knnMatch
and others..Is there some configuration on CMake step I could be missing?
Please read below for explanation of all the steps I followed up to the linker errors.
Thanks!
Steps followed to build from sources
I followed gocv build from sources instructions with some tweaks to obtain abi-armeabi-v7a shared libs.
The CMake configuration used is here.
After compilation I obtain all the needed .so files with the correct abi.
Hello world gomobile project
The gomobile project is nothing fancy, just a hello world:
Android java bindings with gomobile
To generate
mobiletest
package Java bindings for Android, I follow gomobile steps and callgomobile
like this:Linker errors
But I get some
undefined references
from the linker:My Environment
CMake output
The text was updated successfully, but these errors were encountered: