![]() 机器人 93.089% disconnected | 登录后回复主题 | 跳到回复(1)
|
1 - 2011-2-23 14:16
heihei1252 地球参考一下吧:
It's because the new Windows toolchain doesn't support Cygwin's drive
mapping (i.e. /cygdrive/c/ instead of C:/)
There is however a new function, called host-path, that you can use to
perform the translation from cygwin to windows,
you should call it as:
$(call host-path,<your-path>)
Note that this is a temporary measure. A future release of the NDK will
completely get rid of Cygwin (but host-path will still be provided and will
be a no-op).
Final note, host-path is automatically applied to the content of
LOCAL_C_INCLUDES (and LOCAL_EXPORT_C_INCLUDES). This is not the case for
LOCAL_CFLAGS or LOCAL_CPPFLAGS
On Fri, Dec 10, 2010 at 10:08 AM, lifelessonline <lifelessonl...@hotmail.com
- 隐藏被引用文字 -
- 显示引用的文字 -
> wrote:
> Hi all,
> I have a project that I have been successfully compiling with ndk r4.
> I just got my NDK r5 and it is having some troubles finding one of my
> precompiled libraries.
> This is the message ndk-build gives:
> --------------------------------------------------------------
> $ ndk-build
> SharedLibrary : libMYLIB.so
> arm-linux-androideabi-g++.exe: /cygdrive/d/Development/MyProject/build/
> Android/jni/MyProject/Externals/precompiled/lib/Android/precompiled.a:
> No such file or directory
> make: *** [/cygdrive/d/Development/MyProject/build/Android/obj/local/
> armeabi/libMYLIB.so] Error 1
> --------------------------------------------------------------
> And this is the relevant portion of the makefile:
> --------------------------------------------------------------
> LOCAL_LDLIBS := \
> -L$(NDK_PLATFORMS_ROOT)/$(TARGET_PLATFORM)/arch-arm/usr/lib \
> -L$(MYPROJECTS)/Externals/precompiled/lib/Android \
> -llog -lz -ldl -lgcc -lprecompiled
First, the -L$(NDK_PLATFORMS_ROOT)/$(TARGET_PLATFORM)/arch-arm/usr/lib is
not needed.
Second, you can replace the second line with:
-L$(call host-path,$(MYPROJECTS)/Externals/precompiled/lib/Android) \
Note that NDK r5 now supports prebuilt libraries and module import. They are
probably a better way to achieve what you need here, since you have
precompiled stuff.
It's because the new Windows toolchain doesn't support Cygwin's drive
mapping (i.e. /cygdrive/c/ instead of C:/)
There is however a new function, called host-path, that you can use to
perform the translation from cygwin to windows,
you should call it as:
$(call host-path,<your-path>)
Note that this is a temporary measure. A future release of the NDK will
completely get rid of Cygwin (but host-path will still be provided and will
be a no-op).
Final note, host-path is automatically applied to the content of
LOCAL_C_INCLUDES (and LOCAL_EXPORT_C_INCLUDES). This is not the case for
LOCAL_CFLAGS or LOCAL_CPPFLAGS
On Fri, Dec 10, 2010 at 10:08 AM, lifelessonline <lifelessonl...@hotmail.com
- 隐藏被引用文字 -
- 显示引用的文字 -
> wrote:
> Hi all,
> I have a project that I have been successfully compiling with ndk r4.
> I just got my NDK r5 and it is having some troubles finding one of my
> precompiled libraries.
> This is the message ndk-build gives:
> --------------------------------------------------------------
> $ ndk-build
> SharedLibrary : libMYLIB.so
> arm-linux-androideabi-g++.exe: /cygdrive/d/Development/MyProject/build/
> Android/jni/MyProject/Externals/precompiled/lib/Android/precompiled.a:
> No such file or directory
> make: *** [/cygdrive/d/Development/MyProject/build/Android/obj/local/
> armeabi/libMYLIB.so] Error 1
> --------------------------------------------------------------
> And this is the relevant portion of the makefile:
> --------------------------------------------------------------
> LOCAL_LDLIBS := \
> -L$(NDK_PLATFORMS_ROOT)/$(TARGET_PLATFORM)/arch-arm/usr/lib \
> -L$(MYPROJECTS)/Externals/precompiled/lib/Android \
> -llog -lz -ldl -lgcc -lprecompiled
First, the -L$(NDK_PLATFORMS_ROOT)/$(TARGET_PLATFORM)/arch-arm/usr/lib is
not needed.
Second, you can replace the second line with:
-L$(call host-path,$(MYPROJECTS)/Externals/precompiled/lib/Android) \
Note that NDK r5 now supports prebuilt libraries and module import. They are
probably a better way to achieve what you need here, since you have
precompiled stuff.
回到顶部 | 开发讨论 | 返回 Android 首页 | 注册 | 找回密码








