首先需要安装JPEG库(安装包:jpegsrc.v6b.tar)
下载地址:http://download.csdn.net/source/2637188
编译并安装Jpeg格式支持文件,
tar zvxf jpegsrc.v6b.tar.gz
./configure --enable-shared --enable-static
make
make install
//===================
编译jpeg时报错
/usr/bin/install -c -m 644 ./cjpeg.1
/usr/local/man/man1/cjpeg.1
/usr/bin/install: cannot create regular file
`/usr/local/man/man1/cjpeg.1': No such file or directory
缺少/usr/local/man目录及man1子目录,新建后重新编译。
shell> mkdir /usr/local/man
shell> mkdir /usr/local/man/man1
//=====================
代码显示:
编译,运行显示如下: