Log in or register to post comments

Unable to compile ImageTargets sample app

May 29, 2012 - 1:40am #1

I am trying to run ImageTargets sample app. When i compile the code with ndk-build. it gives me errors. Please help me to run this code.

the error log is this :

C:\Development\Android\vuforia-sdk-android-1-5-9\samples\ImageTargets\jni>ndk-bu
ild
"Compile++ arm : ImageTargets C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:25:23: error: GLES2/gl2.h: No such file or directory
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:26:26: error: GLES2/gl2ext.h: No such file or directory
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:59: error: 'GLint' does not name a type
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:60: error: 'GLint' does not name a type
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:61: error: 'GLint' does not name a type
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:62: error: 'GLint' does not name a type
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp: In function 'void Java_com_qualcomm_QCARSamples_ImageTargets_ImageT
argetsRenderer_renderFrame(JNIEnv*, _jobject*)':
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:310: error: 'GL_COLOR_BUFFER_BIT' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:310: error: 'GL_DEPTH_BUFFER_BIT' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:310: error: 'glClear' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:329: error: 'GL_DEPTH_TEST' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:329: error: 'GL_FALSE' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:390: error: ISO C++ forbids declaration of 'type name' with no type
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:390: error: ISO C++ forbids declaration of 'type name' with no type
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:390: error: expected primary-expression before 'const'
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:390: error: expected ')' before 'const'
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:391: error: 'normalHandle' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:392: error: ISO C++ forbids declaration of 'type name' with no type
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:392: error: ISO C++ forbids declaration of 'type name' with no type
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:392: error: expected primary-expression before 'const'
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:392: error: expected ')' before 'const'
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:393: error: 'textureCoordHandle' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:394: error: ISO C++ forbids declaration of 'type name' with no type
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:394: error: ISO C++ forbids declaration of 'type name' with no type
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:394: error: expected primary-expression before 'const'
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:394: error: expected ')' before 'const'
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:396: error: 'glEnableVertexAttribArray' was not declared in this sco
pe
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:400: error: 'GL_TEXTURE0' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:400: error: 'glActiveTexture' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:401: error: 'GL_TEXTURE_2D' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:401: error: 'glBindTexture' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:402: error: 'mvpMatrixHandle' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:403: error: 'GLfloat' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:403: error: expected primary-expression before ')' token
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:403: error: 'glUniformMatrix4fv' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:404: error: 'GL_TRIANGLES' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:404: error: 'GL_UNSIGNED_SHORT' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:405: error: ISO C++ forbids declaration of 'type name' with no type
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:405: error: ISO C++ forbids declaration of 'type name' with no type
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:405: error: expected primary-expression before 'const'
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:405: error: expected ')' before 'const'
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:412: error: 'glDisable' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:420: error: 'vertexHandle' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:420: error: 'glDisableVertexAttribArray' was not declared in this sc
ope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp: In function 'void Java_com_qualcomm_QCARSamples_ImageTargets_ImageT
argetsRenderer_initRendering(JNIEnv*, _jobject*)':
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:682: error: 'glClearColor' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:687: error: 'glGenTextures' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:688: error: 'GL_TEXTURE_2D' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:688: error: 'glBindTexture' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:689: error: 'GL_TEXTURE_MIN_FILTER' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:689: error: 'GL_LINEAR' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:689: error: 'glTexParameterf' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:690: error: 'GL_TEXTURE_MAG_FILTER' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:691: error: 'GL_RGBA' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:692: error: 'GL_UNSIGNED_BYTE' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:693: error: 'GLvoid' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:693: error: expected primary-expression before ')' token
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:693: error: 'glTexImage2D' was not declared in this scope
C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets//jni/Image
Targets.cpp:700: error: 'glGetUniformLocation' was not declared in this scope
make: *** [C:/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets
//obj/local/armeabi/objs/ImageTargets/ImageTargets.o] Error 1

Re: Unable to compile ImageTargets sample app

May 29, 2012 - 12:05pm #3

Hello,

Please run ndk-build from the ImageTargets folder, not the JNI folder within the ImageTargets folder.

Thank you,

-Peter

Re: Unable to compile ImageTargets sample app

May 29, 2012 - 5:51am #2

Hi, I got similar problem as well but when I compile it in the Eclipse there is nothing in SRC folder !!

Log in or register to post comments