首页 > 代码库 > Linux 下安装JPEG库

Linux 下安装JPEG库

因为采集来的图像要进行存储,所以用到了这个库....具体安装方法在网络上能找到很多,大都可以用

我下载了这个jpegsrc.v9a.tar.gz 地址:www.ijg.org 

然后就进行了安装,随便下载到一个路径下,然后我在一个网站上看到了“作者: 何志强”写的一个安装脚本,稍微改了下版本号,存储成了个文件,然后source了…

#----where to download----#ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v9a.tar.gz#----.tar.gz file name----jpeg_tar_gz=jpegsrc.v9a.tar.gz#----which version----ver_jpeg=jpeg-9a#----where to install----jpeg=/usr/local/jpeg#----untar----tar xzvf $jpeg_tar_gz#----install----cd $ver_jpeg./configure --prefix=$jpeg --enable-shared --enable-staticmakemkdir $jpegmkdir $jpeg/includemkdir $jpeg/libmkdir $jpeg/binmkdir $jpeg/manmkdir $jpeg/man/man1make installcd ..#----free----rm -rf $ver_jpeg#----configuration information----echo "---------------------------------------------------------------------"echo "please add following lines in you /etc/profile"echo "("echo " tip:"echo " you can add these lines in a file named /etc/profile.jpeg,"echo " and then add a line on the end of /etc/profile:"echo " . /etc/profile.jpeg"echo " it is simple,:)"echo "):"echo " PATH=""$""PATH:$jpeg/bin"echo " CPLUS_INCLUDE_PATH=""$""CPLUS_INCLUDE_PATH:$jpeg/include"echo " LD_LIBRARY_PATH=""$""LD_LIBRARY_PATH:$jpeg/lib"echo " LIBRARY_PATH=""$""LIBRARY_PATH:$jpeg/lib"echo " MANPATH=""$""MANPATH:$jpeg/man"echo ""echo " export PATH CPLUS_INCLUDE_PATH LD_LIBRARY_PATH LIBRARY_PATH MANPATH"
上边这段中echo "---------------------------------------------------------------------"
之后的内容手动照做就可以了
建一个叫profile_jpeg的文件,内容写在下面……
就这样JPEG库PC版本就搞定了…晚上再写装嵌入式版本的方法