Forums - Newbie Sample Build problems

2 posts / 0 new
Last post
Newbie Sample Build problems
guraaf
Join Date: 27 Feb 14
Posts: 5
Posted: Fri, 2014-02-28 15:10

Hello all,

I am a complete newbie so apologize for taking your time. I have lots of experience with development on Linux but none on Android, leave alone FastCV. I have of course played with OpenCV. So here goes. I am developing on Ubuntu 12.04. Ideally, I want to start with a simple command-line application that uses FastCV. Something that I will perhaps run with:

$ adb push libs/armeabi/edgetest /data/local/tmp

$ adb shell /data/local/tmp/edgetest foo.jpg bar.jpg

where, edgetest.c would make calls to FastCV functions. I am hoping to compile with ndk-build. But before I write my own application, I want to build FastCV sample applications. I have Android SDK, NDK and Eclipse though I haven't figured out how to use Eclipse yet :-( I could write my edgetest.c using Native C code and build via ndk-build and test. My first Android program :-) I don't care for GUI right now.

I couldn't go through all the steps listed in the Qualcomm Getting Started Guide because the interface was a bit different on Ubuntu and ADT/Eclipse. I couldn't figure out how to create a new project in the Eclipse GUI from existing sources etc. I am perhaps just too old school when it comes to IDE. I tried command-line builds first.

$ cd sandbox/ndk/samples/edgetest/jni

$ ndk-build

This worked so I tried to build the loadjpeg sample app in FastCV that didn't since I don't know to specify the -I and -L paths

$ cd sandbox/fastcv-android-1-4-0/samples/loadjpeg/jni

$ ndk-build

Android NDK: WARNING: APP_PLATFORM android-19 is larger than android:minSdkVersion 8 in /home/g.aggarwal/android-dev/fastcv-android-1-4-0/samples/loadjpeg/AndroidManifest.xml    
Android NDK: WARNING:/home/g.aggarwal/android-dev/fastcv-android-1-4-0/samples/loadjpeg/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] Compile++ thumb: fastcvsample <= loadjpeg.cpp
/home/g.aggarwal/android-dev/fastcv-android-1-4-0/samples/loadjpeg/jni/loadjpeg.cpp:37:27: fatal error: fastcv/fastcv.h: No such file or directory
compilation terminated.
 
How do I tell ndk-build the path for include and libraries?
  • Up0
  • Down0
guraaf
Join Date: 27 Feb 14
Posts: 5
Posted: Fri, 2014-02-28 16:00

Apologies again. I actually did get it to build. Here is the really stupid mistake that I made (really)

I copied the lib and include files to sdk/platforms/android-19/ instead of to ndk/platforms/android-19/ etc. I did find it odd that there was arch-arm in the sdk/platforms area but had proceeded to create it. How stupid.

More testing to be done. For now, not sure how I can use the libfastcvsample.so that got created. At least the build worked.

  • 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.