Chinaunix首页 | 论坛 | 博客
  • 博客访问: 665781
  • 博文数量: 111
  • 博客积分: 5010
  • 博客等级: 大校
  • 技术积分: 1461
  • 用 户 组: 普通用户
  • 注册时间: 2008-01-08 14:40
文章分类

全部博文(111)

文章存档

2010年(10)

2009年(70)

2008年(31)

我的朋友

分类: C/C++

2008-05-07 10:35:54

今天在编译一个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) |
给主人留下些什么吧!~~