设为首页 加入收藏

TOP

undefined reference to `png_create_write_struct'问题解决(二)
2014-11-24 01:09:11 】 浏览:6709
Tags:undefined reference png_create_write_struct' 问题 解决
ference to `png_set_compression_level'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG12composeImageERK6QImageRK6QPoint[QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)]+0x1e8): undefined reference to `png_set_write_fn'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG12composeImageERK6QImageRK6QPoint[QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)]+0x21f): undefined reference to `png_set_filler'
.obj/release-shared/qanimationwriter.o: In function `QAnimationWriterMNG::~QAnimationWriterMNG()':
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNGD0Ev[_ZN19QAnimationWriterMNGD5Ev]+0x9e): undefined reference to `png_write_chunk'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNGD0Ev[_ZN19QAnimationWriterMNGD5Ev]+0xb0): undefined reference to `png_destroy_write_struct'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNGD0Ev[_ZN19QAnimationWriterMNGD5Ev]+0x176): undefined reference to `png_write_chunk'
.obj/release-shared/qanimationwriter.o: In function `QAnimationWriterMNG::setImage(QImage const&)':
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG8setImageERK6QImage[QAnimationWriterMNG::setImage(QImage const&)]+0xc3): undefined reference to `png_write_chunk'
.obj/release-shared/qanimationwriter.o: In function `QAnimationWriterMNG::~QAnimationWriterMNG()':
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNGD2Ev[_ZN19QAnimationWriterMNGD5Ev]+0x9e): undefined reference to `png_write_chunk'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNGD2Ev[_ZN19QAnimationWriterMNGD5Ev]+0xb0): undefined reference to `png_destroy_write_struct'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNGD2Ev[_ZN19QAnimationWriterMNGD5Ev]+0x16e): undefined reference to `png_write_chunk'
collect2: ld 返回 1
make: *** [../../bin/qvfb] 错误 1


截图如下:



解决办法:


第一步:#locate libpng


我的电脑显示如下:


/lib/i386-linux-gnu/libpng12.so.0
/lib/i386-linux-gnu/libpng12.so.0.46.0
/usr/share/doc/libpng12-0
/usr/share/doc/libpng12-0/ANNOUNCE
/usr/share/doc/libpng12-0/KNOWNBUG
/usr/share/doc/libpng12-0/README.Debian
/usr/share/doc/libpng12-0/README.gz
/usr/share/doc/libpng12-0/TODO
/usr/share/doc/libpng12-0/changelog.Debian.gz
/usr/share/doc/libpng12-0/copyright
/usr/share/doc/libpng12-0/libpng-1.2.46.txt.gz
/usr/share/doc-base/libpng12
/var/lib/doc-base/documents/libpng12
/var/lib/dpkg/info/libpng12-0:i386.list
/var/lib/dpkg/info/libpng12-0:i386.md5sums
/var/lib/dpkg/info/libpng12-0:i386.postinst
/var/lib/dpkg/info/libpng12-0:i386.postrm
/var/lib/dpkg/info/libpng12-0:i386.shlibs



第二步:建立链接#ln -s /lib/i386-linux-gnu/libpng12.so.0 /lib/i386-linux-gnu/libpng.so



第三步:修改Makefile文件,#gedit Makefile(或者 #vi Makefile),在LIBS后面添加-L/lib/i386-linux-gnu -lpng这两项



重新make后,成功!


首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇龙芯1B开发板移植SQLite 3.6.20 下一篇Ubuntu 上编译Android出现cannot ..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目