Log in or register to post comments

NDK build error - Path Issue

March 24, 2013 - 2:22am #1

Hi Moderators,

 

I am getting ndk build error.  Trying to build from different location.

Hi, the path of my  ImageTarget Sample running successfully is

D:\setup\android\vuforia-sdk-android\samples\ImageTarget

Android.mk (Image Target)

 

LOCAL_SRC_FILES = ../../../build/lib/$(TARGET_ARCH_ABI)/libQCAR.so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../build/include

 

Vuforia SDK Path

D:\setup\android\vuforia-sdk-android\samples

 

My Project Location

d:\workspace\android\git\tpg-demo-ar\MyProject

Please help me what should I enter in 

LOCAL_SRC _FILES

LOCAL_EXPORT_C_INCLUDES

 

I have alraedy check links avaialble in forum  over this topic , but they failed to help me out

 

Regards

Vineet

 

 

NDK build error - Path Issue

March 4, 2014 - 12:03pm #18

How did you solve the vm aborting problem?

NDK build error - Path Issue

June 20, 2013 - 10:43pm #17

Hi, there are some basic steps explained in our dev guide:

https://developer.vuforia.com/forum/faq/android-how-integrate-cloudreco-imagetargets-sample

 

NDK build error - Path Issue

June 20, 2013 - 9:21pm #16

excuse me

i am newbie on linux and vuforia 

i don't know how to install the android ndk, so anyone can help me?

please gimme basic tutorial for install android ndk on linux (ubuntu)

thank you so much...

NDK build error - Path Issue

March 29, 2013 - 7:07am #15

... have you refreshed the project in Eclipse after ndk-building ?

you may also want to check this article, which guides you through the resolution of most common errors in building and running the samples:

https://developer.vuforia.com/forum/faq/android-how-do-i-fix-my-compile-or-runtime-errors

 

NDK build error - Path Issue

March 29, 2013 - 6:07am #14

Yes that is the error in the logCat

03-29 13:47:13.140: I/dalvikvm(16303): Could not find method com.qualcomm.QCAR.QCAR.requiresAlpha, referenced from method com.qualcomm.QCARSamples.ImageTargets.ImageTargets.initApplicationAR
03-29 13:47:13.140: W/dalvikvm(16303): VFY: unable to resolve static method 65: Lcom/qualcomm/QCAR/QCAR;.requiresAlpha ()Z
 

03-29 13:47:13.160: E/dalvikvm(16303): VM aborting
03-29 13:47:13.160: A/libc(16303): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1)
 

NDK build error - Path Issue

March 29, 2013 - 5:56am #13

do you get any error message in your logs ?

NDK build error - Path Issue

March 29, 2013 - 5:48am #12

Thank very munch

I have a new problem the ImageTargets sample.

I have built the sample and i have it on my device.But on the device when i click the Start button nothing happen!!

I have dark screen!!

Thank for every Help !!

NDK build error - Path Issue

March 29, 2013 - 5:42am #11

You're welcome.

NDK build error - Path Issue

March 29, 2013 - 5:40am #10

Now i have  tried running the ndk-build from a windows cmd console.

It ok Thanks!!

NDK build error - Path Issue

March 29, 2013 - 5:38am #9

Hi,

it looks like you have some acces permission problem;

have you tried running the ndk-build from a windows cmd console (instead of using cygwin) ?

if that does not solve the issue, here is a discussion about the same topic, with some solutions suggested:

http://stackoverflow.com/questions/11551742/ndk-build-error-with-cygwin

 

NDK build error - Path Issue

March 29, 2013 - 1:42am #8

It is my first tutorial but i have many error with nkd-build

That is the errors . I dont know whow .

Pleayse help me to correct it. Thank

MyName ~
$ cd /cygdrive/c/AndroidSDK/vuforia-sdk-android-2-0-31/samples/ImageTargets

MyName /cygdrive/c/AndroidSDK/vuforia-sdk-android-2-0-31/samples/ImageTargets
$ ndk-build
SharedLibrary  : libImageTargets.so
C:/AndroidSDK/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: error: cannot open ./obj/local/armeabi/libQCAR.so: Permission denied
C:/AndroidSDK/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/ImageTargets/ImageTargets.o: in function ImageTargets_UpdateCallback::QCAR_onUpdate(QCAR::State&):jni/ImageTargets.cpp:96: error: undefined reference to 'QCAR::TrackerManager::getInstance()'
C:/AndroidSDK/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/ImageTargets/ImageTargets.o: in function Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargets_initTracker:jni/ImageTargets.cpp:154: error: undefined reference to 'QCAR::TrackerManager::getInstance()'
C:/AndroidSDK/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/ImageTargets/ImageTargets.o: in function Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargets_deinitTracker:jni/ImageTargets.cpp:173: error: undefined reference to 'QCAR::TrackerManager::getInstance()'
C:/AndroidSDK/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/ImageTargets/ImageTargets.o: in function Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargets_loadTrackerData:jni/ImageTargets.cpp:184: error: undefined reference to 'QCAR::TrackerManager::getInstance()'
C:/AndroidSDK/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/ImageTargets/ImageTargets.o: in function Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargets_onQCARInitializedNative:jni/ImageTargets.cpp:298: error: undefined reference to 'QCAR::registerCallback(QCAR::UpdateCallback*)'
C:/AndroidSDK/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/ImageTargets/ImageTargets.o: in function Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargetsRenderer_renderFrame:jni/ImageTargets.cpp:315: error: undefined reference to 'QCAR::Renderer::getInstance()'
C:/AndroidSDK/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/ImageTargets/ImageTargets.o: in function Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargetsRenderer_renderFrame:jni/ImageTargets.cpp:318: error: undefined reference to 'QCAR::Renderer::getInstance()'
C:/AndroidSDK/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/ImageTargets/ImageTargets.o: in function Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargetsRenderer_renderFrame:jni/ImageTargets.cpp:338: error: undefined reference to 'QCAR::Renderer::getInstance()'
C:/AndroidSDK/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/ImageTargets/ImageTargets.o: in function Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargetsRenderer_renderFrame:jni/ImageTargets.cpp:345: error: undefined reference to 'QCAR::State::getNumTrackableResults() const'
C:/AndroidSDK/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/ImageTargets/ImageTargets.o: in function Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargetsRenderer_renderFrame:jni/ImageTargets.cpp:348: error: undefined reference to 'QCAR::State::getTrackableResult(int) const'
C:/AndroidSDK/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/ImageTargets/ImageTargets.o: in function Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargetsRenderer_renderFrame:jni/ImageTargets.cpp:351: error: undefined reference to 'QCAR::Tool::convertPose2GLMatrix(QCAR::Matrix34F const&)'
C:/AndroidSDK/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/ImageTargets/ImageTargets.o: in function Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargetsRenderer_renderFrame:jni/ImageTargets.cpp:439: error: undefined reference to 'QCAR::Renderer::getInstance()'
C:/AndroidSDK/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/ImageTargets/ImageTargets.o: in function Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargetsRenderer_renderFrame:jni/ImageTargets.cpp:439: error: undefined reference to 'QCAR::State::~State()'
C:/AndroidSDK/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/ImageTargets/ImageTargets.o: in function configureVideoBackground:jni/ImageTargets.cpp:447: error: undefined reference to 'QCAR::CameraDevice::getInstance()'
C:/AndroidSDK/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/ImageTargets/ImageTargets.o: in function Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargets_startCamera:jni/ImageTargets.cpp:587: error: undefined reference to 'QCAR::CameraDevice::getInstance()'
C:/AndroidSDK/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/ImageTargets/ImageTargets.o: in function Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargets_startCamera:jni/ImageTargets.cpp:594: error: undefined reference to 'QCAR::CameraDevice::getInstance()'
C:/AndroidSDK/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/ImageTargets/ImageTargets.o: in function Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargets_startCamera:jni/ImageTargets.cpp:599: error: undefined reference to 'QCAR::CameraDevice::getInstance()'
C:/AndroidSDK/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/ImageTargets/ImageTargets.o: in function Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargets_setProjectionMatrix:jni/ImageTargets.cpp:643: error: undefined reference to 'QCAR::Tool::getProjectionGL(QCAR::CameraCalibration const&, float, float)'
C:/AndroidSDK/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/ImageTargets/ImageTargets.o: in function Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargetsRenderer_initRendering:jni/ImageTargets.cpp:700: error: undefined reference to 'QCAR::requiresAlpha()'
collect2: ld returned 1 exit status
/cygdrive/c/AndroidSDK/android-ndk-r8d/build/core/build-binary.mk:397: recipe for target `obj/local/armeabi/libImageTargets.so' failed
make: *** [obj/local/armeabi/libImageTargets.so] Error 1

NDK build error - Path Issue

March 25, 2013 - 12:56am #7

glad to help.

NDK build error - Path Issue

March 24, 2013 - 11:44pm #6

Thanks

 

Once again thanks for your support

NDK build error - Path Issue

March 24, 2013 - 11:42pm #5

Sure; the rule is pretty simple;

in a path like  ../../../../../../some_directory,

every "../" tells the system to "move up" by one directory; so, because you start from the /jni folder under your "myProject" directory, you need to move upward (i.e. to the parent directory) until you reach the "D:/" directory (in your example). Then from there you can append the path setup/android-sdk-window/etc.....

 

NDK build error - Path Issue

March 24, 2013 - 11:02pm #4

Hi  Thanks,

 

For saving me out.

My Project is now working.

But can you please make me clear how you come to this path ? Kindly explain  because it will help all beginners and this thread will

save lot of time of moderators as this is common problem.

 

Regards

Vineet Aggarwal

NDK build error - Path Issue

March 24, 2013 - 3:11pm #3

Hi,

LOCAL_SRC_FILES must point to the libQCAR.so which in you case is located in:

D:/setup/android/vuforia-sdk-android/build/lib/armeabi-v7a/ 

while the LOCAL_EXPORT_C_INCLUDES should point to the include directory:

D:/setup/android/vuforia-sdk-android/build/include

In practice, if your project is located in 

d:\workspace\android\git\tpg-demo-ar\MyProject

(and your JNI folder is located in d:\workspace\android\git\tpg-demo-ar\MyProject\jni)

then your paths should be as follow:

 

LOCAL_SRC_FILES = ../../../../../../setup/android/vuforia-sdk-android/build/lib/$(TARGET_ARCH_ABI)/libQCAR.so
 
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../../../../setup/android/vuforia-sdk-android/build/include
 
 
 

NDK build error - Path Issue

March 24, 2013 - 8:00am #2

Hi Moderators,

 

Please help me out

It's quite urgent.

 

Regards

Vineet Aggarwal

Log in or register to post comments