Ask Your Question

ruifei0713's profile - activity

2016-02-15 07:48:34 -0600 received badge  Taxonomist
2012-09-18 03:12:13 -0600 received badge  Student (source)
2012-07-12 11:42:42 -0600 asked a question Compile error in building *modified* Tutorial 4

The error in my title occurs in the compilation of a modified version of OpenCV 2.4.2 Tutorial 4 in Eclipse Indigo. The modifications allow stereo feature matching.

Here is the complete error:

In file included from ../../sdk/native/jni/include/opencv2/flann/miniflann.hpp:49, from ../../sdk/native/jni/include/opencv2/features2d/features2d.hpp:46, from jni/jnipart.cpp:4: ../../sdk/native/jni/include/opencv2/flann/defines.h:79: error: expected constructor, destructor, or type conversion before 'namespace' make: *** [obj/local/armeabi-v7a/objs/mixedsample/jni_part.o] Error 1

I'm really not sure why this error pops up. I actually was able to run my modified tutorial before I accidentally overwrote the file and had to re-modify it. However, I never once touched any of the header files (and especially not defines.h in flann because I don't use flann - I use BruteForceMatcher). I'm thinking there's something wrong with my set-up in Eclipse.

Thanks in advance. -Ruifei

2012-07-11 12:43:31 -0600 commented question Error building Android OpenCV 2.4.2 Tutorial

I believe SDK 19 and NDK 8

2012-07-11 12:43:16 -0600 received badge  Famous Question (source)
2012-07-09 02:39:24 -0600 received badge  Notable Question (source)
2012-07-07 11:14:12 -0600 received badge  Popular Question (source)
2012-07-06 16:20:35 -0600 received badge  Editor (source)
2012-07-06 16:18:01 -0600 asked a question Error building Android OpenCV 2.4.2 Tutorial

While trying to build the new OpenCV-2.4.2-android-sdks Tutorial 4, I'm running into errors. I first opened all the projects in Eclipse and fixed some things like Android API target levels, SDK directory, and the ndk-build command (because 2.4.2 was originally configured for Windows, I'm running on Ubuntu 11.10).

However, Eclipse still did not run. So I tried to build Tutorial 4 from the command line. In the tutorial 4 directory, I entered

ant clean

but that ran into this error:

BUILD FAILED

/home/ruifei0713/Documents/Android/android-sdks/tools/ant/build.xml:487: Invalid file: /home/ruifei0713/android-opencv/OpenCV-2.4.2-android-sdk/sdk/java/build.xml

Whenever I try

ant debug

It runs into a similar error:

BUILD FAILED

/home/ruifei0713/Documents/Android/android-sdks/tools/ant/build.xml:570: Invalid file: /home/ruifei0713/android-opencv/OpenCV-2.4.2-android-sdk/sdk/java/build.xml

I'm not sure what this means because /home/ruifei0713/android-opencv/OpenCV-2.4.2-android-sdk/sdk/java/build.xml is definitely an invalid file because it doesn't exist! My question is why it even looks there and how I can fix this to build Tutorial 4 in OpenCV 2.4.2.

Thanks in advance.