如何在Linux 17上安装BPG (更好的便携图形)?我从tar.gz下载了的网站文件。ReadMe文件上说,
编辑Makefile以更改编译选项(Linux的默认编译选项应该可以)。键入“make”以编译,并键入“make”以安装已编译的二进制文件。
我没有编辑Makefile。我在目录中打开终端并运行make。它返回以下错误:
gcc -g -Wl,--gc-sections -o bpgdec bpgdec.o libbpg.a -lpng -lrt -lm -lpthread
bpgdec.o: In function `png_save':
/home/ghort/Downloads/libbpg-0.9.5/bpgdec.c:118: undefined reference to
`png_set_longjmp_fn'
collect2: error: ld returned 1 exit status
make: *** [bpgdec] Error 1我想我在其他地方读到我需要安装libpng16实验,但我不确定。
发布于 2015-08-23 12:21:14
最好不要更改正式安装的包libpng12-dev,而应该在Makefile中从libbpg中找到libpng 1.6。
因此,我修改Anthon的解决方案:
# install dev packages needed
sudo apt-get install -y libsdl-image1.2-dev libsdl1.2-dev libjpeg8-dev
# download, configure, make and make install PNG 1.6 (You coul find a newer version like 1.16.18 for me)
wget -O libpng-1.6.16.tar.xz 'http://downloads.sourceforge.net/project/libpng/libpng16/1.6.16/libpng-1.6.16.tar.xz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Flibpng%2Ffiles%2Flibpng16%2F1.6.16%2F&ts=1424607004&use_mirror=garr'
tar xf libpng-1.6.16.tar.xz
pushd libpng-1.6.16
./configure
make -j
sudo make install
#### The installation will take place in /usr/local by default and it's ok !
popd
# download, make and make install BPG
wget http://bellard.org/bpg/libbpg-0.9.5.tar.gz
tar xf libbpg-0.9.5.tar.gz
pushd libbpg-0.9.5
#### edit Makefile and insert the two following directive :
# "CFLAGS+=-I/usr/local/include" after the line CFLAGS+=-I.
# "LDFLAGS+=-L /usr/local/lib" before the line CFLAGS+=-g
make -j
sudo make install
popd全是这些人!
https://unix.stackexchange.com/questions/181735
复制相似问题