Log in or register to post comments

Compiling Errors with ImageTargets using 3D render Engine

June 5, 2012 - 3:46am #1

Hello,

I am new to QCAR. I succeeded to run "ImageTargets" on my Android phone with Tea pot. Now I want to add a 3D render Engine. I selected OSG for this. OSG is a static build.

Now I want to include this libraries in to "ImageTargets" program. I modified Android.mk as specified here

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
OSG_ANDROID_DIR := /root/Development/Android/vuforia-sdk-android-1-5-9/samples/ImageTargets
LIBDIR := $(OSG_ANDROID_DIR)/obj/local/armeabi

LOCAL_C_INCLUDES:= $(OSG_ANDROID_DIR)/include
LOCAL_CPPFLAGS := -DOSG_LIBRARY_STATIC

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 := ImageTargets
LOCAL_CFLAGS := -Wno-write-strings $(OPENGLES_DEF)

LOCAL_LDLIBS := \
-llog $(OPENGLES_LIB)
LOCAL_SHARED_LIBRARIES := QCAR-prebuilt

LOCAL_SRC_FILES := .....
include $(BUILD_SHARED_LIBRARY)

when I compile (ndk-build) I am getting the following error

jni/ImageTargets.cpp:17:31: error: osgDB/DatabasePager: No such file or directory
jni/ImageTargets.cpp:18:26: error: osgDB/Registry: No such file or directory
jni/ImageTargets.cpp:19:26: error: osgDB/ReadFile: No such file or directory
jni/ImageTargets.cpp:20:27: error: osgDB/WriteFile: No such file or directory
make: *** [obj/local/armeabi/objs-debug/ImageTargets/ImageTargets.o] Error 1

All these errors with OSG lib. Can you please help me how to compile this?

Thanks in advance
wizards

Re: Compiling Errors with ImageTargets using 3D render Engine

June 5, 2012 - 11:54am #2

I think that you're going to need to declare a module for OSG. Here is an example of how to define a static library in Android.mk

http://stackoverflow.com/questions/2943828/how-to-compile-a-static-library-using-the-android-ndk

Log in or register to post comments