Hi everyone, I am trying to setup the FastCV sample projects but I'm having difficulties building them. I am new to jni and C++ in general, so I would appreciate any help.
Notes: I am using Eclipse ADT. I dowloaded the FastCV SDK and imported the sample projects, where I failed to build the projects.
The error seems to be pointing to this, at line 53/54:
all:
@$(ANDROID_NDK_ROOT)/ndk-build
**** Build of configuration Default for project fastcorner ****
make all
Host OS was auto-detected: windows
Usage: cygpath (-d|-m|-u|-w|-t TYPE) [-f FILE] [OPTION]... NAME...
cygpath [-c HANDLE]
cygpath [-ADHOPSW]
cygpath [-F ID]
Convert Unix and Windows format paths, or output system path information
Output type options:
-d, --dos print DOS (short) form of NAMEs (C:\PROGRA~1\)
-m, --mixed like --windows, but with regular slashes (C:/WINNT)
-M, --mode report on mode of file (binmode or textmode)
-u, --unix (default) print Unix form of NAMEs (/cygdrive/c/winnt)
-w, --windows print Windows form of NAMEs (C:\WINNT)
-t, --type TYPE print TYPE form: 'dos', 'mixed', 'unix', or 'windows'
Path conversion options:
-a, --absolute output absolute path
-l, --long-name print Windows long form of NAMEs (with -w, -m only)
-p, --path NAME is a PATH list (i.e., '/bin:/usr/bin')
-s, --short-name print DOS (short) form of NAMEs (with -w, -m only)
-C, --codepage CP print DOS, Windows, or mixed pathname in Windows
codepage CP. CP can be a numeric codepage identifier,
or one of the reserved words ANSI, OEM, or UTF8.
If this option is missing, cygpath defaults to the
character set defined by the current locale.
System information:
-A, --allusers use `All Users' instead of current user for -D, -O, -P
-D, --desktop output `Desktop' directory and exit
-H, --homeroot output `Profiles' directory (home root) and exit
-O, --mydocs output `My Documents' directory and exit
Makefile:54: recipe for target 'all' failed
-P, --smprograms output Start Menu `Programs' directory and exit
-S, --sysdir output system directory and exit
-W, --windir output `Windows' directory and exit
-F, --folder ID output special folder with numeric ID and exit
Try `cygpath --help' for more information.
make: /ndk-build: Command not found
make: *** [all] Error 127
**** Build Finished ****
Do you have NDK installed? If you do so. Did you try building it in cygwin, under the JNI folder, by typing "ndk-build"?
I have NDK installed. I tried building using cygwin, but I get the following error:
$ ndk-build
Android NDK: WARNING:jni/Android.mk:fastcvsample: non-system libraries in linker flags: -lfastcv
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
[armeabi] Gdbserver : [arm-linux-androideabi-4.6] libs/armeabi/gdbserver
[armeabi] Gdbsetup : libs/armeabi/gdb.setup
[armeabi] Cygwin : Generating dependency file converter script
[armeabi] Compile++ thumb: fastcvsample <= FastCVSample.cpp
jni/FastCVSample.cpp:19:27: fatal error: fastcv/fastcv.h: No such file or directory
compilation terminated.
/cygdrive/c/Development/Android/android-ndk-r9b/build/core/build-binary.mk:386: recipe for target 'obj/local/armeabi/objs-debug/fastcvsample/FastCVSample.o' failed
make: *** [obj/local/armeabi/objs-debug/fastcvsample/FastCVSample.o] Error 1
Notes: I have followed the 'getting started' guide for FastCV. Steps I have taken:
1) I have added C/C++ attributes to the project using File > New > Other > C/C++ > Convert to a C++ Project
2) I have put 'libfastcv.a' in 'C:\Development\Android\android-ndk-r9b\platforms\android-19\arch-arm\usr\lib'
3) I have created a folder called 'fastcv' inside 'C:\Development\Android\android-ndk-r9b\platforms\android-19\arch-arm\usr\lib' - in which I have pasted the files 'fastcv.h', 'fastcv.inl' and 'stdint_.h'.
Any help would be appreciated. Thanks.
At step 3. when you create fastcv folder, that should be in the .../usr/include folder (not /usr/lib).
Thanks, that was one of the issues. I was also not placing those files in the correct android api folder (i.e. 9). I managed to build and install the apps, but now I have errors that have popped up when I clicked on the C++ files inside the jni folder - seems like it's not recognising any of the code?
I'm new to all this, so not too sure of what's going on. Thanks for the help!