openframeworks / openFrameworks

openFrameworks is a community-developed cross platform toolkit for creative coding in C++.
http://openframeworks.cc
Other
9.99k stars 2.55k forks source link

Addon dependencies include order in make #4568

Open HalfdanJ opened 9 years ago

HalfdanJ commented 9 years ago

I just added an dependency in ofxCv to ofxOpenCV, but in make based build systems this has an issue, ofxCv gets included before ofxOpenCV in the linking phase, it should be opposite, dependencies should get included first.

I've tried to move the dependency includer in config.addons.mk around a bit, but haven't found a place where it works.

arturoc commented 9 years ago

what error do you get? i'm trying adding a dependency from ofxCv to ofxOpenCv and it's working fine for me. also adding ofxopenCv both as a dependency and in addons.make

HalfdanJ commented 9 years ago

Errors like these (i've removed ofxOpenCV from addons.make)

/Users/jonas/Development/openframeworks/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(blobdetector.cpp.o):blobdetector.cpp:function cv::SimpleBlobDetector::~SimpleBlobDetector(): error: undefined reference to 'cv::Algorithm::~Algorithm()'
/Users/jonas/Development/openframeworks/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(blobdetector.cpp.o):blobdetector.cpp:function cv::SimpleBlobDetector::~SimpleBlobDetector(): error: undefined reference to 'cv::Algorithm::~Algorithm()'
/Users/jonas/Development/openframeworks/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(blobdetector.cpp.o):blobdetector.cpp:function cv::SimpleBlobDetector::~SimpleBlobDetector(): error: undefined reference to 'cv::Algorithm::~Algorithm()'
/Users/jonas/Development/openframeworks/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(blobdetector.cpp.o):blobdetector.cpp:function cv::SimpleBlobDetector::~SimpleBlobDetector(): error: undefined reference to 'cv::Algorithm::~Algorithm()'
/Users/jonas/Development/openframeworks/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(blobdetector.cpp.o):blobdetector.cpp:function cv::SimpleBlobDetector::SimpleBlobDetector(cv::SimpleBlobDetector::Params const&): error: undefined reference to 'cv::Algorithm::Algorithm()'
/Users/jonas/Development/openframeworks/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(blobdetector.cpp.o):blobdetector.cpp:construction vtable for cv::FeatureDetector-in-cv::SimpleBlobDetector: error: undefined reference to 'cv::Algorithm::write(cv::FileStorage&) const'
/Users/jonas/Development/openframeworks/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(blobdetector.cpp.o):blobdetector.cpp:construction vtable for cv::FeatureDetector-in-cv::SimpleBlobDetector: error: undefined reference to 'cv::Algorithm::read(cv::FileNode const&)'
/Users/jonas/Development/openframeworks/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(detectors.cpp.o):detectors.cpp:function cv::GFTTDetector::GFTTDetector(int, double, double, int, bool, double): error: undefined reference to 'cv::Algorithm::Algorithm()'
HalfdanJ commented 9 years ago

And my linker flags looks like this:

/Users/jonas/Development/Android/android-ndk-r10e/toolchains/x86-4.9/prebuilt/darwin-x86_64/bin/i686-linux-android-g++
-o
libs/x86/libOFAndroidApp_x86.so
-s
obj/android/x86/Release/src/main.o
obj/android/x86/Release/src/ofApp.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxAndroid/src/ofAppAndroidWindow.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxAndroid/src/ofxAndroidAccelerometer.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxAndroid/src/ofxAndroidGPS.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxAndroid/src/ofxAndroidLogChannel.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxAndroid/src/ofxAndroidSoundPlayer.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxAndroid/src/ofxAndroidSoundStream.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxAndroid/src/ofxAndroidUtils.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxAndroid/src/ofxAndroidVibrator.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxAndroid/src/ofxAndroidVideoGrabber.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxAndroid/src/ofxAndroidVideoPlayer.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxAccelerometer/src/ofxAccelerometer.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxBiquadFilter/src/ofxBiquadFilter.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxBiquadFilter/src/ofxBiquadFilterInstance.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxCv/libs/CLD/src/ETF.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxCv/libs/CLD/src/fdog.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxCv/libs/ofxCv/src/Calibration.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxCv/libs/ofxCv/src/ContourFinder.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxCv/libs/ofxCv/src/Distance.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxCv/libs/ofxCv/src/Flow.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxCv/libs/ofxCv/src/Helpers.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxCv/libs/ofxCv/src/Kalman.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxCv/libs/ofxCv/src/ObjectFinder.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxCv/libs/ofxCv/src/RunningBackground.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxCv/libs/ofxCv/src/Tracker.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxCv/libs/ofxCv/src/Utilities.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxCv/libs/ofxCv/src/Wrappers.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxOpenCv/src/ofxCvColorImage.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxOpenCv/src/ofxCvContourFinder.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxOpenCv/src/ofxCvFloatImage.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxOpenCv/src/ofxCvGrayscaleImage.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxOpenCv/src/ofxCvHaarFinder.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxOpenCv/src/ofxCvImage.o
/Users/jonas/Development/openframeworks/openFrameworks/addons/obj/android/x86/Release/ofxOpenCv/src/ofxCvShortImage.o
/Users/jonas/Development/openframeworks/openFrameworks/libs/openFrameworksCompiled/lib/android/x86/libopenFrameworks.a

/Users/jonas/Development/openframeworks/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_androidcamera.a
/Users/jonas/Development/openframeworks/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_calib3d.a
/Users/jonas/Development/openframeworks/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_contrib.a
/Users/jonas/Development/openframeworks/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_core.a
/Users/jonas/Development/openframeworks/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a
/Users/jonas/Development/openframeworks/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_flann.a
/Users/jonas/Development/openframeworks/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_gpu.a
/Users/jonas/Development/openframeworks/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_highgui.a
/Users/jonas/Development/openframeworks/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_imgproc.a
/Users/jonas/Development/openframeworks/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_legacy.a
/Users/jonas/Development/openframeworks/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_ml.a
/Users/jonas/Development/openframeworks/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_nonfree.a
/Users/jonas/Development/openframeworks/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_objdetect.a
/Users/jonas/Development/openframeworks/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_photo.a
/Users/jonas/Development/openframeworks/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_stitching.a
/Users/jonas/Development/openframeworks/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_superres.a
/Users/jonas/Development/openframeworks/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_ts.a
/Users/jonas/Development/openframeworks/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_video.a
/Users/jonas/Development/openframeworks/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_videostab.a
--sysroot=/Users/jonas/Development/Android/android-ndk-r10e/platforms/android-19/arch-x86/
-nostdlib
-L"/Users/jonas/Development/Android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86"
-shared
-Wl,--no-undefined
-Wl,--as-needed
-Wl,--gc-sections
-Wl,--exclude-libs,ALL
-landroid
/Users/jonas/Development/openframeworks/openFrameworks/libs/FreeImage/lib/android/x86/libfreeimage.a
/Users/jonas/Development/openframeworks/openFrameworks/libs/boost/lib/android/x86/libboost_filesystem.a
/Users/jonas/Development/openframeworks/openFrameworks/libs/boost/lib/android/x86/libboost_system.a
/Users/jonas/Development/openframeworks/openFrameworks/libs/freetype/lib/android/x86/libfreetype.a
/Users/jonas/Development/openframeworks/openFrameworks/libs/tess2/lib/android/x86/libtess2.a

/Users/jonas/Development/openframeworks/openFrameworks/libs/poco/lib/android/x86/libPocoNetSSL.a
/Users/jonas/Development/openframeworks/openFrameworks/libs/poco/lib/android/x86/libPocoNet.a
/Users/jonas/Development/openframeworks/openFrameworks/libs/poco/lib/android/x86/libPocoCrypto.a
/Users/jonas/Development/openframeworks/openFrameworks/libs/poco/lib/android/x86/libPocoJSON.a
/Users/jonas/Development/openframeworks/openFrameworks/libs/poco/lib/android/x86/libPocoMongoDB.a
/Users/jonas/Development/openframeworks/openFrameworks/libs/poco/lib/android/x86/libPocoDataSQLite.a
/Users/jonas/Development/openframeworks/openFrameworks/libs/poco/lib/android/x86/libPocoData.a
/Users/jonas/Development/openframeworks/openFrameworks/libs/poco/lib/android/x86/libPocoUtil.a
/Users/jonas/Development/openframeworks/openFrameworks/libs/poco/lib/android/x86/libPocoXML.a
/Users/jonas/Development/openframeworks/openFrameworks/libs/poco/lib/android/x86/libPocoFoundation.a
/Users/jonas/Development/openframeworks/openFrameworks/libs/openssl/lib/android/x86/libssl.a
/Users/jonas/Development/openframeworks/openFrameworks/libs/openssl/lib/android/x86/libcrypto.a

-lOpenSLES
-lsupc++
-lz
-lGLESv1_CM
-lGLESv2
-llog
-ldl
-lm
-lc
-lgnustl_static
-lgcc
bakercp commented 7 years ago

@HalfdanJ are you still getting these issues? I haven't been able to reproduce them.

micuat commented 7 years ago

as referenced I get similar error while compiling ofxFaceTracker2 (dlib) on android. the errors are following

/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(blobdetector.cpp.o):blobdetector.cpp:function cv::SimpleBlobDetector::~SimpleBlobDetector(): error: undefined reference to 'cv::Algorithm::~Algorithm()'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(blobdetector.cpp.o):blobdetector.cpp:function cv::SimpleBlobDetector::~SimpleBlobDetector(): error: undefined reference to 'cv::Algorithm::~Algorithm()'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(blobdetector.cpp.o):blobdetector.cpp:function cv::SimpleBlobDetector::~SimpleBlobDetector(): error: undefined reference to 'cv::Algorithm::~Algorithm()'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(blobdetector.cpp.o):blobdetector.cpp:function cv::SimpleBlobDetector::~SimpleBlobDetector(): error: undefined reference to 'cv::Algorithm::~Algorithm()'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(blobdetector.cpp.o):blobdetector.cpp:function cv::SimpleBlobDetector::SimpleBlobDetector(cv::SimpleBlobDetector::Params const&): error: undefined reference to 'cv::Algorithm::Algorithm()'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(blobdetector.cpp.o):blobdetector.cpp:construction vtable for cv::FeatureDetector-in-cv::SimpleBlobDetector: error: undefined reference to 'cv::Algorithm::write(cv::FileStorage&) const'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(blobdetector.cpp.o):blobdetector.cpp:construction vtable for cv::FeatureDetector-in-cv::SimpleBlobDetector: error: undefined reference to 'cv::Algorithm::read(cv::FileNode const&)'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(detectors.cpp.o):detectors.cpp:function cv::GFTTDetector::GFTTDetector(int, double, double, int, bool, double): error: undefined reference to 'cv::Algorithm::Algorithm()'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(detectors.cpp.o):detectors.cpp:function cv::DenseFeatureDetector::DenseFeatureDetector(float, int, float, int, int, bool, bool): error: undefined reference to 'cv::Algorithm::Algorithm()'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(detectors.cpp.o):detectors.cpp:function cv::GridAdaptedFeatureDetector::GridAdaptedFeatureDetector(cv::Ptr<cv::FeatureDetector> const&, int, int, int): error: undefined reference to 'cv::Algorithm::Algorithm()'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(detectors.cpp.o):detectors.cpp:typeinfo for cv::FeatureDetector: error: undefined reference to 'typeinfo for cv::Algorithm'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(detectors.cpp.o):detectors.cpp:construction vtable for cv::FeatureDetector-in-cv::GridAdaptedFeatureDetector: error: undefined reference to 'cv::Algorithm::write(cv::FileStorage&) const'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(detectors.cpp.o):detectors.cpp:construction vtable for cv::FeatureDetector-in-cv::GridAdaptedFeatureDetector: error: undefined reference to 'cv::Algorithm::read(cv::FileNode const&)'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(detectors.cpp.o):detectors.cpp:vtable for cv::GridAdaptedFeatureDetector: error: undefined reference to 'cv::Algorithm::write(cv::FileStorage&) const'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(detectors.cpp.o):detectors.cpp:vtable for cv::GridAdaptedFeatureDetector: error: undefined reference to 'cv::Algorithm::read(cv::FileNode const&)'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:function SimpleBlobDetector_info(): error: undefined reference to 'cv::AlgorithmInfo::AlgorithmInfo(std::string const&, cv::Algorithm* (*)())'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:function SimpleBlobDetector_info(): error: undefined reference to 'cv::AlgorithmInfo::~AlgorithmInfo()'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:function GFTTDetector_info(): error: undefined reference to 'cv::AlgorithmInfo::AlgorithmInfo(std::string const&, cv::Algorithm* (*)())'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:function GFTTDetector_info(): error: undefined reference to 'cv::AlgorithmInfo::~AlgorithmInfo()'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:function cv::GFTTDetector::info() const: error: undefined reference to 'cv::AlgorithmInfo::addParam(cv::Algorithm&, char const*, int&, bool, int (cv::Algorithm::*)(), void (cv::Algorithm::*)(int), std::string const&)'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:function cv::GFTTDetector::info() const: error: undefined reference to 'cv::AlgorithmInfo::addParam(cv::Algorithm&, char const*, double&, bool, double (cv::Algorithm::*)(), void (cv::Algorithm::*)(double), std::string const&)'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:function cv::GFTTDetector::info() const: error: undefined reference to 'cv::AlgorithmInfo::addParam(cv::Algorithm&, char const*, double&, bool, double (cv::Algorithm::*)(), void (cv::Algorithm::*)(double), std::string const&)'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:function cv::GFTTDetector::info() const: error: undefined reference to 'cv::AlgorithmInfo::addParam(cv::Algorithm&, char const*, bool&, bool, int (cv::Algorithm::*)(), void (cv::Algorithm::*)(int), std::string const&)'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:function cv::GFTTDetector::info() const: error: undefined reference to 'cv::AlgorithmInfo::addParam(cv::Algorithm&, char const*, double&, bool, double (cv::Algorithm::*)(), void (cv::Algorithm::*)(double), std::string const&)'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:function MSER_info(): error: undefined reference to 'cv::AlgorithmInfo::AlgorithmInfo(std::string const&, cv::Algorithm* (*)())'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:function MSER_info(): error: undefined reference to 'cv::AlgorithmInfo::~AlgorithmInfo()'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:function cv::MSER::info() const: error: undefined reference to 'cv::AlgorithmInfo::addParam(cv::Algorithm&, char const*, int&, bool, int (cv::Algorithm::*)(), void (cv::Algorithm::*)(int), std::string const&)'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:function cv::MSER::info() const: error: undefined reference to 'cv::AlgorithmInfo::addParam(cv::Algorithm&, char const*, int&, bool, int (cv::Algorithm::*)(), void (cv::Algorithm::*)(int), std::string const&)'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:function cv::MSER::info() const: error: undefined reference to 'cv::AlgorithmInfo::addParam(cv::Algorithm&, char const*, int&, bool, int (cv::Algorithm::*)(), void (cv::Algorithm::*)(int), std::string const&)'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:function cv::MSER::info() const: error: undefined reference to 'cv::AlgorithmInfo::addParam(cv::Algorithm&, char const*, double&, bool, double (cv::Algorithm::*)(), void (cv::Algorithm::*)(double), std::string const&)'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:function FlannBasedMatcher_info(): error: undefined reference to 'cv::AlgorithmInfo::AlgorithmInfo(std::string const&, cv::Algorithm* (*)())'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:function FlannBasedMatcher_info(): error: undefined reference to 'cv::AlgorithmInfo::~AlgorithmInfo()'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:function HarrisDetector::info() const: error: undefined reference to 'cv::AlgorithmInfo::addParam(cv::Algorithm&, char const*, bool&, bool, int (cv::Algorithm::*)(), void (cv::Algorithm::*)(int), std::string const&)'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:function cv::FastFeatureDetector::info() const: error: undefined reference to 'cv::AlgorithmInfo::addParam(cv::Algorithm&, char const*, bool&, bool, int (cv::Algorithm::*)(), void (cv::Algorithm::*)(int), std::string const&)'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:function cv::FastFeatureDetector2::info() const: error: undefined reference to 'cv::AlgorithmInfo::addParam(cv::Algorithm&, char const*, bool&, bool, int (cv::Algorithm::*)(), void (cv::Algorithm::*)(int), std::string const&)'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:function cv::FastFeatureDetector2::info() const: error: undefined reference to 'cv::AlgorithmInfo::addParam(cv::Algorithm&, char const*, short&, bool, int (cv::Algorithm::*)(), void (cv::Algorithm::*)(int), std::string const&)'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:function cv::SimpleBlobDetector::info() const: error: undefined reference to 'cv::AlgorithmInfo::addParam(cv::Algorithm&, char const*, float&, bool, float (cv::Algorithm::*)(), void (cv::Algorithm::*)(float), std::string const&)'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:function cv::SimpleBlobDetector::info() const: error: undefined reference to 'cv::AlgorithmInfo::addParam(cv::Algorithm&, char const*, float&, bool, float (cv::Algorithm::*)(), void (cv::Algorithm::*)(float), std::string const&)'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:function cv::SimpleBlobDetector::info() const: error: undefined reference to 'cv::AlgorithmInfo::addParam(cv::Algorithm&, char const*, float&, bool, float (cv::Algorithm::*)(), void (cv::Algorithm::*)(float), std::string const&)'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:function cv::SimpleBlobDetector::info() const: error: undefined reference to 'cv::AlgorithmInfo::addParam_(cv::Algorithm&, char const*, int, void*, bool, int (cv::Algorithm::*)() const, void (cv::Algorithm::*)(int), std::string const&)'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:function cv::SimpleBlobDetector::info() const: error: undefined reference to 'cv::AlgorithmInfo::addParam(cv::Algorithm&, char const*, float&, bool, float (cv::Algorithm::*)(), void (cv::Algorithm::*)(float), std::string const&)'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:function cv::SimpleBlobDetector::info() const: error: undefined reference to 'cv::AlgorithmInfo::addParam(cv::Algorithm&, char const*, unsigned char&, bool, unsigned char (cv::Algorithm::*)(), void (cv::Algorithm::*)(unsigned char), std::string const&)'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:function cv::GridAdaptedFeatureDetector::info() const: error: undefined reference to 'cv::AlgorithmInfo::addParam_(cv::Algorithm&, char const*, int, void*, bool, int (cv::Algorithm::*)() const, void (cv::Algorithm::*)(int), std::string const&)'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:construction vtable for cv::FeatureDetector-in-cv::FastFeatureDetector: error: undefined reference to 'cv::Algorithm::write(cv::FileStorage&) const'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(features2d_init.cpp.o):features2d_init.cpp:construction vtable for cv::FeatureDetector-in-cv::FastFeatureDetector: error: undefined reference to 'cv::Algorithm::read(cv::FileNode const&)'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(descriptors.cpp.o):descriptors.cpp:typeinfo for cv::DescriptorExtractor: error: undefined reference to 'typeinfo for cv::Algorithm'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(brisk.cpp.o):brisk.cpp:function cv::BriskLayer::getAgastPoints(int, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&): error: undefined reference to 'cv::Algorithm::set(char const*, int)'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_features2d.a(matchers.cpp.o):matchers.cpp:typeinfo for cv::DescriptorMatcher: error: undefined reference to 'typeinfo for cv::Algorithm'
/Users/naoto/Documents/of_v0.9.8_android_release/addons/ofxOpenCv/libs/opencv/lib/android/x86/libopencv_objdetect.a(haar.cpp.o):haar.cpp:function cvHaarDetectObjectsForROC(void const*, CvHaarClassifierCascade*, CvMemStorage*, std::vector<int, std::allocator<int> >&, std::vector<double, std::allocator<double> >&, double, int, int, CvSize, CvSize, bool): error: undefined reference to 'cvCanny'
collect2: error: ld returned 1 exit status
make[1]: *** [libs/x86/libOFAndroidApp_x86.so] Error 1
micuat commented 7 years ago

which is actually weird since I'm building for ARM. for some reason x86 library is included in the linker

micuat commented 7 years ago

never mind the comment above. I think I figured out the problem; it's related to the link order. As a test I renamed opencvimgproc.a to opencvyimgproc.a and opencvcore.a to opencvzcore.a to change the link order and it compiles. I wonder the link order can be specified in addon_config or somewhere to fix this issue