今天在编译一个MiniGUI的程序时候,出现下面的错误:
[root@localhost cam-capture-miniguilcd_show]# make
arm-linux-gcc -L/usr/local/arm/arm-linux/lib -Wall -o serv loadbmp.o spcav4l.o -ljpeg -lminigui -lpthread
/usr/local/arm/arm-linux/lib/libminigui.so: undefined reference to `png_set_gray_1_2_4_to_8'
/usr/local/arm/arm-linux/lib/libminigui.so: undefined reference to `png_error'
/usr/local/arm/arm-linux/lib/libminigui.so: undefined reference to `png_set_strip_alpha'
/usr/local/arm/arm-linux/lib/libminigui.so: undefined reference to `png_get_rowbytes'
/usr/local/arm/arm-linux/lib/libminigui.so: undefined reference to `png_set_strip_16'
/usr/local/arm/arm-linux/lib/libminigui.so: undefined reference to `png_create_read_struct'
/usr/local/arm/arm-linux/lib/libminigui.so: undefined reference to `png_set_sig_bytes'
/usr/local/arm/arm-linux/lib/libminigui.so: undefined reference to `png_set_read_fn'
/usr/local/arm/arm-linux/lib/libminigui.so: undefined reference to `png_set_packing'
/usr/local/arm/arm-linux/lib/libminigui.so: undefined reference to `png_get_sRGB'
/usr/local/arm/arm-linux/lib/libminigui.so: undefined reference to `png_set_gray_to_rgb'
/usr/local/arm/arm-linux/lib/libminigui.so: undefined reference to `png_get_channels'
/usr/local/arm/arm-linux/lib/libminigui.so: undefined reference to `png_get_gAMA'
/usr/local/arm/arm-linux/lib/libminigui.so: undefined reference to `png_get_valid'
/usr/local/arm/arm-linux/lib/libminigui.so: undefined reference to `png_set_palette_to_rgb'
/usr/local/arm/arm-linux/lib/libminigui.so: undefined reference to `png_get_PLTE'
/usr/local/arm/arm-linux/lib/libminigui.so: undefined reference to `png_get_IHDR'
/usr/local/arm/arm-linux/lib/libminigui.so: undefined reference to `png_read_info'
/usr/local/arm/arm-linux/lib/libminigui.so: undefined reference to `png_destroy_read_struct'
/usr/local/arm/arm-linux/lib/libminigui.so: undefined reference to `png_check_sig'
/usr/local/arm/arm-linux/lib/libminigui.so: undefined reference to `png_read_update_info'
/usr/local/arm/arm-linux/lib/libminigui.so: undefined reference to `png_read_image'
/usr/local/arm/arm-linux/lib/libminigui.so: undefined reference to `png_get_tRNS'
/usr/local/arm/arm-linux/lib/libminigui.so: undefined reference to `png_create_info_struct'
/usr/local/arm/arm-linux/lib/libminigui.so: undefined reference to `png_set_gamma'
/usr/local/arm/arm-linux/lib/libminigui.so: undefined reference to `png_read_end'
collect2: ld returned 1 exit status
make: *** [serv] 错误 1
好像我的程序里面没有使用png的东西啊,不知道为什么会有什么这个提示呢?
既然有了问题就得解决啊。
是不是因为我没有pnglib的原因,我一想好像有啊:
[root@localhost cam-capture-miniguilcd_show]# ll /usr/local/arm/arm-linux/lib/libpn*
-rw-r--r-- 1 root root 305444 2007-10-29 /usr/local/arm/arm-linux/lib/libpng.a
lrwxrwxrwx 1 root root 11 4月 30 08:35 /usr/local/arm/arm-linux/lib/libpng.so -> libpng.so.2
lrwxrwxrwx 1 root root 21 4月 30 08:35 /usr/local/arm/arm-linux/lib/libpng.so.2 -> libpng.so.2.1.0.10rc1
-rwxr-xr-x 1 root root 234299 2007-10-29 /usr/local/arm/arm-linux/lib/libpng.so.2.1.0.10rc1
这里也有libpng。
最后在Makefile中增加了蓝色部分:
$(CC) $(LDFLAGS) -Wall -o $@ $(OBJS_PUT) $(LDLIBS) -ljpeg -lpng -lminigui -lpthread
最后,一切正常了。
阅读(3529) | 评论(0) | 转发(0) |