Forums - Trouble building sample projects

7 posts / 0 new
Last post
Trouble building sample projects
may
Join Date: 27 Jan 14
Posts: 5
Posted: Mon, 2014-01-27 14:36

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 ****
 

  • Up0
  • Down0
Gradon
Join Date: 19 Sep 13
Posts: 6
Posted: Mon, 2014-01-27 18:07

Do you have NDK installed? If you do so. Did you try building it in cygwin, under the JNI folder, by typing "ndk-build"?

  • Up0
  • Down0
may
Join Date: 27 Jan 14
Posts: 5
Posted: Tue, 2014-01-28 05:22

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
 

  • Up0
  • Down0
may
Join Date: 27 Jan 14
Posts: 5
Posted: Tue, 2014-01-28 06:52

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.

  • Up0
  • Down0
Gradon
Join Date: 19 Sep 13
Posts: 6
Posted: Tue, 2014-01-28 09:20

At step 3. when you create fastcv folder, that should be in the .../usr/include folder (not /usr/lib).

  • Up0
  • Down0
may
Join Date: 27 Jan 14
Posts: 5
Posted: Tue, 2014-01-28 16:25

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?

  • Up0
  • Down0
may
Join Date: 27 Jan 14
Posts: 5
Posted: Tue, 2014-01-28 16:25

I'm new to all this, so not too sure of what's going on. Thanks for the help!

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.