I'm trying to create, and follow the recipe. I get this error when I try to create TestBox2d with Eclipse:
all / cygdrive / c / android / android-ndk-r3 / build / prebuilt / windows / arm-eabi-4.2 Do.1 / bin / arm-abi-ld \ -inst consign-shard-bismambilik -a-undefined \ oo obj / libtest.so obj / test.o -l .. / box2d / lib / android -lbox2d \ - L / Cygdrive / c / android / android-ndk-r3 / build / platforms / android-3 / arch-arm / usr / lib \ -log -lc -lstdc ++ -lm / cygdrive / c / android / android-ndk -r3 /build/prebuilt/windows/arm-eabi-4.2.1/lib/gcc/arm-eabi/4.2.1/interwork/libgcc.a \
/ cygdrive / c / android / android -ndk -r3 / build / prebuilt / windows / arm-eabi-4.2.1 / bin / arm-eabi-ld: can not be found -lbox2d: *** [obj / libtest.so] Ti 1
There was only one thing that I changed was given was TestBox2d \ Makefile, where I changed the path of Andike.
There are others who have the same problem but I do not know how to fix it.
An error indicates that the linker library can not find box2d
I think the problem is that you have a relative path, pointing to the location of the box 2D library ( -L .. / box2d / lib / android
) is. If your build directory changes, your build will break. What you want to do is a complete path to the box 2D library (like -l / cygdrive / c / box2d / lib / android
). All your link paths in the NDK are complete.
A better way would be to keep the path in your environment in an environment variable for your box2d library and use this environment variable in your makefile.
/ div>
Comments
Post a Comment