0

好的,我知道这已经提出来了。然而我的似乎没有得到解决。在我们开始之前,让我们知道以下几点:

  • 操作系统:Win7 (x86)
  • IDE:Eclipse Juno (4.2)
  • NDK:r8e
  • Android API:17(果冻豆 4.2)

我试图让 SDL_ttf 完全编译。我只是在尝试构建这个项目并继续做事,并且在努力让它认识到某些文件确实确实存在于他们说它们存在的地方。我现在得到

更新

17:06:42 **** Incremental Build of configuration Default for project OmegaDice ****
"C:\\android-ndk-r8e\\ndk-build.cmd" V=1 clean all all 
FIND: Parameter format not correct
Clean: SDL2 [armeabi]
Clean: SDL2_ttf [armeabi]
Clean: freetype [armeabi]
Clean: main [armeabi]
Clean: stlport_shared [armeabi]
Clean: stlport_static [armeabi]
del /f/q .\libs\armeabi\libSDL2.so    >NUL 2>NUL
Install        : libSDL2.so => libs/armeabi/libSDL2.so
copy /b/y ".\obj\local\armeabi\libSDL2.so" ".\libs\armeabi\libSDL2.so" > NUL
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/arm-linux-androideabi-strip --strip-unneeded  ./libs/armeabi/libSDL2.so
"Compile thumb : SDL2_ttf <= SDL_ttf.c
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/arm-linux-androideabi-gcc -MMD -MP -MF ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o.d -fpic -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -march=armv5te -mtune=xscale -msoft-float -mthumb -Os -g -DNDEBUG -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -Ijni/SDL_ttf -Ijni/SDL_ttf/../SDL/include -Ijni/SDL_ttf/../freetype/include -Ijni/SDL_ttf/include -IC:/android-ndk-r8e/sources/cxx-stl/stlport/stlport -IC:/android-ndk-r8e/sources/cxx-stl//gabi++/include -Ijni/SDL_ttf -DANDROID -Os -Wa,--noexecstack  -IC:/android-ndk-r8e/platforms/android-14/arch-arm/usr/include -c  jni/SDL_ttf/SDL_ttf.c -o ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o 
SharedLibrary  : libSDL2_ttf.so
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/arm-linux-androideabi-g++ -Wl,-soname,libSDL2_ttf.so -shared --sysroot=C:/android-ndk-r8e/platforms/android-14/arch-arm ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o ./obj/local/armeabi/libfreetype.a -lgcc ./obj/local/armeabi/libSDL2.so -no-canonical-prefixes  -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now  -LC:/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib -lz -lc -lm -o ./obj/local/armeabi/libSDL2_ttf.so
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o: in function Find_Glyph:jni/SDL_ttf/SDL_ttf.c:590: error: undefined reference to 'FT_Get_Char_Index'
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o: in function Find_Glyph:jni/SDL_ttf/SDL_ttf.c:592: error: undefined reference to 'FT_Load_Glyph'
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o: in function Find_Glyph:jni/SDL_ttf/SDL_ttf.c:656: error: undefined reference to 'FT_Outline_Transform'
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o: in function Find_Glyph:jni/SDL_ttf/SDL_ttf.c:662: error: undefined reference to 'FT_Get_Glyph'
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o: in function Find_Glyph:jni/SDL_ttf/SDL_ttf.c:663: error: undefined reference to 'FT_Stroker_New'
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o: in function Find_Glyph:jni/SDL_ttf/SDL_ttf.c:667: error: undefined reference to 'FT_Stroker_Set'
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o: in function Find_Glyph:jni/SDL_ttf/SDL_ttf.c:669: error: undefined reference to 'FT_Glyph_Stroke'
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o: in function Find_Glyph:jni/SDL_ttf/SDL_ttf.c:671: error: undefined reference to 'FT_Stroker_Done'
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o: in function Find_Glyph:jni/SDL_ttf/SDL_ttf.c:673: error: undefined reference to 'FT_Glyph_To_Bitmap'
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o: in function Find_Glyph:jni/SDL_ttf/SDL_ttf.c:676: error: undefined reference to 'FT_Done_Glyph'
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o: in function Find_Glyph:jni/SDL_ttf/SDL_ttf.c:682: error: undefined reference to 'FT_Render_Glyph'
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o: in function Find_Glyph:jni/SDL_ttf/SDL_ttf.c:885: error: undefined reference to 'FT_Done_Glyph'
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o: in function TTF_Init:jni/SDL_ttf/SDL_ttf.c:334: error: undefined reference to 'FT_Init_FreeType'
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o: in function TTF_CloseFont:jni/SDL_ttf/SDL_ttf.c:915: error: undefined reference to 'FT_Done_Face'
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o: in function TTF_OpenFontIndexRW:jni/SDL_ttf/SDL_ttf.c:420: error: undefined reference to 'FT_Open_Face'
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o: in function TTF_OpenFontIndexRW:jni/SDL_ttf/SDL_ttf.c:442: error: undefined reference to 'FT_Set_Charmap'
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o: in function TTF_OpenFontIndexRW:jni/SDL_ttf/SDL_ttf.c:448: error: undefined reference to 'FT_Set_Char_Size'
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o: in function TTF_OpenFontIndexRW:jni/SDL_ttf/SDL_ttf.c:457: error: undefined reference to 'FT_MulFix'
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o: in function TTF_OpenFontIndexRW:jni/SDL_ttf/SDL_ttf.c:458: error: undefined reference to 'FT_MulFix'
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o: in function TTF_OpenFontIndexRW:jni/SDL_ttf/SDL_ttf.c:460: error: undefined reference to 'FT_MulFix'
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o: in function TTF_OpenFontIndexRW:jni/SDL_ttf/SDL_ttf.c:462: error: undefined reference to 'FT_MulFix'
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o: in function TTF_OpenFontIndexRW:jni/SDL_ttf/SDL_ttf.c:474: error: undefined reference to 'FT_Set_Pixel_Sizes'
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o: in function TTF_GlyphIsProvided:jni/SDL_ttf/SDL_ttf.c:1103: error: undefined reference to 'FT_Get_Char_Index'
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o: in function TTF_SizeUTF8:jni/SDL_ttf/SDL_ttf.c:1204: error: undefined reference to 'FT_Get_Kerning'
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o: in function TTF_RenderUTF8_Solid:jni/SDL_ttf/SDL_ttf.c:1390: error: undefined reference to 'FT_Get_Kerning'
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o: in function TTF_RenderUTF8_Shaded:jni/SDL_ttf/SDL_ttf.c:1568: error: undefined reference to 'FT_Get_Kerning'
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o: in function TTF_RenderUTF8_Blended:jni/SDL_ttf/SDL_ttf.c:1732: error: undefined reference to 'FT_Get_Kerning'
C:/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/SDL2_ttf/SDL_ttf.o: in function TTF_Quit:jni/SDL_ttf/SDL_ttf.c:2140: error: undefined reference to 'FT_Done_FreeType'
collect2: ld returned 1 exit status
make: *** [obj/local/armeabi/libSDL2_ttf.so] Error 1

17:07:20 Build Finished (took 37s.757ms)

jni/SDL_ttf/Android.mk

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := SDL2_ttf
FREETYPE := $(LOCAL_PATH)/freetype
LOCAL_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/../SDL/include $(LOCAL_PATH)/../freetype/include $(LOCAL_PATH)/include

LOCAL_CFLAGS := -Os

LOCAL_CPP_EXTENSION := .cpp

LOCAL_SRC_FILES := SDL_ttf.c

LOCAL_SHARED_LIBRARIES := SDL2
LOCAL_STATIC_LIBRARIES := freetype
LOCAL_LDLIBS := -lz

include $(BUILD_SHARED_LIBRARY)

因此,如果有人对为什么会发生这种情况或如何解决它有任何有用的建议,将不胜感激。

4

1 回答 1

0

问题是这样的:

FIND: Parameter format not correct

所以 freetype 没有被编译。

您正在 Windows 中构建,因此find正在执行的命令是 Windows 版本,它具有不同的语法。

您需要下载一个find与 unix 具有相同语法的程序。例如从这里: http ://unxutils.sourceforge.net/

然后你需要强制 freetype Android.mk 使用新的find

改变:

APP_SUBDIRS := $(patsubst $(LOCAL_PATH)/%, %, $(shell find $(LOCAL_PATH)/src -type d))

APP_SUBDIRS := $(patsubst $(LOCAL_PATH)/%, %, $(shell PATH_TO_UNIXLIKE_FIND\find $(LOCAL_PATH)/src -type d))

例如

APP_SUBDIRS := $(patsubst $(LOCAL_PATH)/%, %, $(shell c:\unixtools\usr\local\wbin\find $(LOCAL_PATH)/src -type d))
于 2013-10-08T08:31:53.730 回答