Log in or register to post comments

How to fix such kind of error

June 16, 2013 - 2:08am #1
I want to integrate imageTargets sample with Cloud recognition by using  tutorial that was given in FAQ of developer portal. But after ndk-build i am getting such kind of error. Am i  missing something? May be someone meet this kind of error
 
 
 
"Compile++ arm  : ImageTargets <= ImageTargets.cpp
jni/ImageTargets.cpp: In function 'int Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargets_initTracker(JNIEnv*, jobject)':
jni/ImageTargets.cpp:206:101: error: invalid static_cast from type 'QCAR::Tracker::TYPE' to type 'QCAR::ImageTracker*'
jni/ImageTargets.cpp:207:9: error: 'tracker' was not declared in this scope
jni/ImageTargets.cpp: In function 'void Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargetsRenderer_renderFrame(JNIEnv*, jobject)':
jni/ImageTargets.cpp:369:25: error: 'env' was not declared in this scope
jni/ImageTargets.cpp:369:45: error: 'obj' was not declared in this scope
jni/ImageTargets.cpp: In function 'void Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargets_startCamera(JNIEnv*, jobject)':
jni/ImageTargets.cpp:693:58: error: 'class QCAR::Tracker' has no member named 'getTargetFinder'
jni/ImageTargets.cpp: In function 'void Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargets_stopCamera(JNIEnv*, jobject)':
jni/ImageTargets.cpp:712:54: error: 'class QCAR::Tracker' has no member named 'getTargetFinder'
make: *** [obj/local/armeabi/objs/ImageTargets/ImageTargets.o] Error 1

How to fix such kind of error

June 17, 2013 - 8:28am #4

You're welcome. Regards.

How to fix such kind of error

June 17, 2013 - 7:09am #3

Thanks AlessandroB, for your help, best regards

How to fix such kind of error

June 16, 2013 - 4:23am #2

Hi, you need to change this line:

QCARSamples_ImageTargets_ImageTargets_initTracker(JNIEnv*, jobject)':

to QCARSamples_ImageTargets_ImageTargets_initTracker(JNIEnv* env, jobject obj)':

and maybe also for the other functions.

 

Then, you need to cast the Tracker to an ImageTracker, i.e. replace:

QCAR::Tracker* imageTracker = ...

with

QCAR::ImageTracker* imageTracker = static_cast<QCAR::ImageTracker*>( targetManager.getTracker( QCAR::Tracker::IMAGE_TRACKER ) );

 

 

Log in or register to post comments