0

我试图使用 jni 编译 android fb2png 本机源代码。但我面临以下问题。我已经搜索过了,但没有找到任何解决方案。请帮我 。添加了ndk问题。

问题 **

** /cygdrive/d/Android_NDK/android-ndk-r5/ndk-build
ompile thumb  : fb2png <= fb2png.c
ompile thumb  : fb2png <= img_process.c
ompile thumb  : fb2png <= fb.c
xecutable     : fb2png
:/RAJESH-ANDROID/Rajesh-workspace/ZT/obj/local/armeabi/objs/fb2png/img_process.o: In function `save_png':
:/RAJESH-ANDROID/Rajesh-workspace/ZT/jni/img_process.c:182: undefined reference to `png_create_write_struct'
:/RAJESH-ANDROID/Rajesh-workspace/ZT/jni/img_process.c:188: undefined reference to `png_create_info_struct'
:/RAJESH-ANDROID/Rajesh-workspace/ZT/jni/img_process.c:192: undefined reference to `png_set_write_fn'
:/RAJESH-ANDROID/Rajesh-workspace/ZT/jni/img_process.c:193: undefined reference to `png_set_IHDR'
:/RAJESH-ANDROID/Rajesh-workspace/ZT/jni/img_process.c:208: undefined reference to `png_set_bKGD'
:/RAJESH-ANDROID/Rajesh-workspace/ZT/jni/img_process.c:209: undefined reference to `png_write_info'
:/RAJESH-ANDROID/Rajesh-workspace/ZT/jni/img_process.c:211: undefined reference to `png_write_image'
:/RAJESH-ANDROID/Rajesh-workspace/ZT/jni/img_process.c:212: undefined reference to `png_write_end'
:/RAJESH-ANDROID/Rajesh-workspace/ZT/jni/img_process.c:214: undefined reference to `png_destroy_write_struct'
:/RAJESH-ANDROID/Rajesh-workspace/ZT/obj/local/armeabi/objs/fb2png/img_process.o: In function `stdio_write_func':
:/RAJESH-ANDROID/Rajesh-workspace/ZT/jni/img_process.c:132: undefined reference to `png_get_io_ptr'
ollect2: ld returned 1 exit status
ake: *** [/cygdrive/D/RAJESH-ANDROID/Rajesh-workspace/ZT/obj/local/armeabi/fb2png] Error 1 **

**

http://code.google.com/p/android-fb2png/source/browse/

我的 libpng 源。 我的项目

谢谢,拉杰什K

4

2 回答 2

2

您缺少 libpng:请注意,来自 repo 的 libpng 的静态副本包含在此处。检查您的目录中是否有 libpng.a 文件,或者您是否提取了 libpng 源代码并为其设置了 makefile。

于 2012-09-04T14:44:03.633 回答
0

将所有这些 png.h pngconf.h pngusr.h 文件从 include 移动到 jni 文件夹。

于 2014-08-05T10:57:51.170 回答