开发者

ld.exe from NDK 5b can't find libraries

I have a make file from an OpenCV port for Android. Since this project seems fairly dead, there haven't been any updates and the last supported NDK version is 4b. With this NDK version everything compiles just find and the code also is working. However If I build it using a newer version I get the following error.

C:/Android/NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld.exe: cannot find -lcxcore
collect2: ld returned 1 exit status
make: *** [/cygdrive/c/Users/<Name>/workspace/<Project>/obj/local/armeabi/libopencv.so] Error 1

I think it is caused by this line:

LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -ldl -llog \
                -L$(TARGET_OUT) -lcxcore -lcv -lcvaux -lcvml -lcvhighgui

However when I check where $(TARGET_OUT) points and see if the library is there, it is available. I think the problem is that I am getting a libcxcore.a file and might need a libcscore.so file in order for this to work. But I am not really sure.

From what I have found on the internet it seems like the linker might be causing problems for many reasons and I really wonder how this could be the case since the code itself works just fine. I hope someone can tell me how to either change my make files so that it will also work with newer NDKs or point me into a direction of where to开发者_Python百科 look for the problem.


For me ld.exe could not find libs under path specified, because I was using cygwin-style path format:

-L/cygdrive/c/Users/tkozak/dev/Android/libs

After changing this to normal windows path:

-LC:/Users/tkozak/dev/Android/libs

Linker worked properly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜