Tuesday, 23 May 2017

Open Data Kit : ODK Scan

Status : Draft


Build


Error 1 :

OpenCV-2.3.1/share/OpenCV/../../include/opencv2/flann/any.h:88:67: error: call to function 'operator<<' that is neither visible in the template
      definition nor found by argument-dependent lookup

Solusi, terapkan patch berikut [sumber]:

diff --git a/modules/flann/include/opencv2/flann/any.h b/modules/flann/include/opencv2/flann/any.h
index 46e1116..06db1b2 100644
--- a/modules/flann/include/opencv2/flann/any.h
+++ b/modules/flann/include/opencv2/flann/any.h
@@ -30,6 +30,12 @@ struct empty_any
 {
 };
 
+inline std::ostream& operator <<(std::ostream& out, const empty_any&)
+{
+    out << "[empty_any]";
+    return out;
+}
+
 struct base_any_policy
 {
     virtual void static_delete(void** x) = 0;
diff --git a/modules/flann/include/opencv2/flann/lsh_index.h b/modules/flann/include/opencv2/flann/lsh_index.h
index a777990..6ed5740 100644
--- a/modules/flann/include/opencv2/flann/lsh_index.h
+++ b/modules/flann/include/opencv2/flann/lsh_index.h
@@ -56,7 +56,7 @@ namespace cvflann
 
 struct LshIndexParams : public IndexParams
 {
-    LshIndexParams(unsigned int table_number, unsigned int key_size, unsigned int multi_probe_level)
+    LshIndexParams(unsigned int table_number = 12, unsigned int key_size = 20, unsigned int multi_probe_level = 2)
     {
         (* this)["algorithm"] = FLANN_INDEX_LSH;
         // The number of hash tables to use

Error 2

armeabi] SharedLibrary  : libbubblebot.so
/home/wildan/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/ext/atomicity.h:49: error: undefined reference to '__atomic_fetch_add_4'
/home/wildan/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/ext/atomicity.h:49: error: undefined reference to '__atomic_fetch_add_4'
/home/wildan/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/ext/atomicity.h:49: error: undefined reference to '__atomic_fetch_add_4'
/home/wildan/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/ext/atomicity.h:49: error: undefined reference to '__atomic_fetch_add_4

Solusi : 

Edit : 

bubblebot_lib/jni/Android.mk

Tambahkan -latomic di LOCAL_LDLIBS :

LOCAL_LDLIBS += $(OPENCV_LIBS) $(ANDROID_OPENCV_LIBS) -llog -ldl -lGLESv2 -latomic                                                                   
 

Referensi


  1. ODK Scan Wiki and Issues, https://github.com/opendatakit/scan

No comments:

Post a Comment