Log in or register to post comments

Error while compiling shared object

December 8, 2010 - 10:33am #1

Hi,

Since the new android update I cannot compile shared objects with ndk-build.

I reinstalled the SDK, NDK and Qualcomm AR SDK and cygwin. I configured correctly the environment paths but the error persists.

I've compiled the san-angeles sample without error, so the problem must be with qualcomm sdk and the new android ndk.

If I return to the ndk r4 it works perfectly!

Config:
SDK Android 2.3 (SDK Tools r8)
NDK r5
Qualcomm 0.9.7

Thanks.

Re: Error while compiling shared object

December 10, 2010 - 8:21am #7

Yes, sorry, it turns out this is an issue with the new version of the NDK and Cygwin. I'm cheating by using a Mac over here, with a real Unix environment ;)

For the moment, it might be easiest to continue building against NDK r4b. For those of you who didn't already have it installed, you can get it from here:

http://dl.google.com/android/ndk/android-ndk-r4b-windows.zip

The next update to the QCAR SDK should contain fixes to work with NDK r5.

- Kim

Re: Error while compiling shared object

December 10, 2010 - 8:11am #6

Same error:

.../ld.exe Cannot find -lQCAR

By default, inside the Android.mk file of ImageTargets application there are the lines that you said me to add.

As I said before, I download NDK r5 and qualcomm 0.9.7 and when I compile the Shared sample application it shows me the error.

Re: Error while compiling shared object

December 9, 2010 - 8:12am #5

That's correct, those lines should already be in the Android.mk file. I just wanted to make sure you hadn't changed them.

- Kim

Re: Error while compiling shared object

December 9, 2010 - 8:04am #4

I think you should write those lines in the Android.mk file (inside jni folder of your app).

Regards,

Marta

Re: Error while compiling shared object

December 9, 2010 - 7:45am #3

Where should I write those lines?

I've cleaned with "ndk-build clean" but after compiling some files the same error has appeared.

It's not critical because I can use the ndk revision 4, but I would like to use the last version.

Thanks.

Re: Error while compiling shared object

December 8, 2010 - 12:47pm #2

I just tried it with that setup (Android 2.3 and NDK r5) and it seemed to work. Try running an "ndk-build clean" before building. Also, have you made any changes to the Android.mk file in the Shared/jni directory? It looks like it can't find the QCAR.so file, but the following lines should include it:

LOCAL_LDLIBS := \
    -L$(LOCAL_PATH)/../../../build/lib/$(TARGET_ARCH_ABI) \
    -llog -lQCAR $(OPENGLES_LIB)

- Kim

Log in or register to post comments