Ask Your Question
0

OpenCV4Android ndk-build error

asked 2013-02-08 04:55:59 -0600

updated 2013-02-08 08:15:58 -0600

Hi,

I am trying to build the examples of the OpenCV SDK for Android.

I could make work the "only Java" examples but I cannot build the examples with native code.

I am under Win7, if I execute ndk-build.cmd in a command window from any of the sample project paths, I get an error like this:

/usr/bin/sh: -c line 2: syntax error: unexpected end of file
make: *** [obj/local/armeabi-v7a/objs/native_sample/jni_part.o] Error 1

I guess I have some configuration error (maybe some environment variable) but I have no experience with NDK and don't know where to look, can anybody point out where to start?

edit retag flag offensive close merge delete

Comments

I've seen that it is recommend to use a command window with ndk-build.cmd instead of cygwin, but in case it can help, if I execute ndk-build in a cigwin terminal i get:

Compile++ thumb : detection_based_tracker <= DetectionBasedTracker_jni.cpp Prebuilt : libgnustl_static.a <= <NDK>/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/ SharedLibrary : libdetection_based_tracker.so C:/Development/Android/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi-v7a/libgnustl_static.a: No such file: Permission denied collect2: ld returned 1 exit status make: * [obj/local/armeabi-v7a/libdetection_based_tracker.so] Error 1

eestopinan gravatar imageeestopinan ( 2013-02-08 05:01:36 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-02-08 09:45:03 -0600

Andrey Pavlenko gravatar image

Try to modify your PATH env var to exclude Cygwin dir before starting ndk-buil.cmd

edit flag offensive delete link more

Comments

BTW, why do you use NDK-r7 that is so outdated?

Andrey Pavlenko gravatar imageAndrey Pavlenko ( 2013-02-08 09:45:57 -0600 )edit

Question Tools

Stats

Asked: 2013-02-08 04:55:59 -0600

Seen: 1,424 times

Last updated: Feb 08 '13