Log in or register to post comments

ndk-build

August 10, 2012 - 10:34am #1

 

 

Hey guys,

I'm using Win7, Cygwin, Eclipse Indigo, Android 3.0.

The sample app works fine and without any problems.

So I have moved the ImageTargets sample and the vuforia-sdk-android-1-5-9 folder with build and lib into my own project.

I have changed the paths of the sample, but now I get an error: LOCAL_SRC_FILES points to a missing file.

"Android NDK: Check that jni/../../../build/lib/armeabi/libQCAR.so exists or that its path is correct. /cygdrive/c/NVPACK/android-ndk-r8/build/core/prebuilt-library.mk: 43. Android NDK: Aborting.

My Android.mk file:

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := QCAR-prebuilt
LOCAL_SRC_FILES = ../../../build/lib/$(TARGET_ARCH_ABI)/libQCAR.so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../build/include
include $(PREBUILT_SHARED_LIBRARY)

include $(CLEAR_VARS)

LOCAL_MODULE := HappyTag
TARGET_PLATFORM := android-5
USE_OPENGL_ES_1_1 := true

ifeq ($(USE_OPENGL_ES_1_1), true)
    OPENGLES_LIB  := -lGLESv1_CM
    OPENGLES_DEF  := -DUSE_OPENGL_ES_1_1
else
    OPENGLES_LIB  := -lGLESv2
    OPENGLES_DEF  := -DUSE_OPENGL_ES_2_0
endif

LOCAL_CFLAGS := -Wno-write-strings $(OPENGLES_DEF)
LOCAL_LDLIBS := \
    -llog $(OPENGLES_LIB)
   
LOCAL_SHARED_LIBRARIES := QCAR-prebuilt
LOCAL_SRC_FILES := HappyTag.cpp Utils.cpp Texture.cpp
LOCAL_ARM_MODE := arm

include $(BUILD_SHARED_LIBRARY)

 

My folder structure looks like this: http://imageshack.us/photo/my-images/607/vuforia.png/

Please please help me. I need this for my graduation project.

Thanks for all,

Viktoria

 

ndk-build

August 10, 2012 - 7:01pm #8

Thanks for all.

I have fixed the problem. ;-)

ndk-build

August 10, 2012 - 4:46pm #7

Hello,

You are using a relative path so you don't need to specify the root drive, C:/ in your case.

As an example, the sample path is ../../../build/lib/$(TARGET_ARCH_ABI)/libQCAR.so 

This means go back three directory levels and then go into the build/lib/<platform>/ folder to find the libQCAR.so file.

I would suggest not putting the vuforia folder in your project but instead the required files in a build folder in your project.

The samples are structured in such a way that they are below the directory structure of the Vuforia so files. You have added these files within your application. You could place your project in the Vuforia Samples folder to make things easier to compile without having to change to many file directory paths. If you do this then the Android.mk file will find the libQCAR.so file without any issue or modification.

Thank you,

-Peter

ndk-build

August 10, 2012 - 4:35pm #6

Hello,

sorry my last paths are incorrect for the project we are talking about.

path Android.mk:

C:\..\HappyTag\jni\android.mk

paths libQCAR.so:

C:\..\HappyTag\vuforia-sdk-android-1-5-9\build\lib\armeabi\libQCAR.so

or

C:\..\HappyTag\vuforia-sdk-android-1-5-9\build\lib\armeabi-v7a\libQCAR.so

In this paths I have saved the needed files.

I don't know how often I have to add "../" and what du you mean with "<your platform>"?

Thanks,

Viktoria

ndk-build

August 10, 2012 - 4:02pm #5

Hello,

The path is relative to your Android.mk file so you don't need the full path.

If your Android.mk file is in the jni folder of your project you need to go back to the root of your projecti n the path with ../ . So lets say libQCAR.so in your project is in build/lib/<your platform>/libQCAR.so then the variable will be ../build/lib/<your platform>/libQCAR.so .

Thank you,

-Peter

ndk-build

August 10, 2012 - 4:01pm #4

sorry for the double post

ndk-build

August 10, 2012 - 3:57pm #3

Hello Peter,

thanks for your reply.

How I have to change the path for correct routing?

I searched through the forums but I didn't find any solution.

Can you please give me an example?

The path of my project folder named Happy Tag is: c:\users\hamtidamti\workspace

path of the libQCAR.so file: c:\users\hamtidamti\workspace\HappyTag\libs\armeabi\libQCAR.so

or

c:\users\hamtidamti\workspace\HappyTag\libs\armeabi-v7a\libQCAR.so

Thanks for you help.

ndk-build

August 10, 2012 - 2:04pm #2

Hello,

The LOCAL_SRC_FILES path is not correct. If you correct this path so it points to the libQCAR.so file you should be fine.

Thank you,

-Peter

Log in or register to post comments