mingw(gcc)编译libjpeg-turbo

最近的工作需要读写jpeg图像,网上找了半天,发现[libjpeg-turbo]1是个不错的选择。
libjpeg-turbo是与[libjpeg]2接口兼容的一个jpeg编/解码库,其主要的特点就是利用SIMD指令(如X86架构的MMX/SSE/SSE2,ARM架构的NEON)来加速jpeg图像的编/解码,相比被广泛使用的libjpeg,编码和解码性能提高2~4倍左右。

下面是其官网的说明:

libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2, NEON) to accelerate baseline JPEG compression and decompression on x86, x86-64, and ARM systems. On such systems, libjpeg-turbo is generally 2-4x as fast as libjpeg, all else being equal. On other types of systems, libjpeg-turbo can still outperform libjpeg by a significant amount, by virtue of its highly-optimized Huffman coding routines. In many cases, the performance of libjpeg-turbo rivals that of proprietary high-speed JPEG codecs.

官网上[Downloads]3已经有编译好的windows平台的用于gcc/vc编译器的库可以下载,目前的最新版本是[1.4.2]4,也可以下载源码(libjpeg-turbo-1.4.2.tar.gz)自己编译,下载地址为: http://nchc.dl.sourceforge.net/project/libjpeg-turbo/1.4.2/libjpeg-turbo-1.4.2.tar.gz,下面讲述如何在Windows下用gcc对libjpeg-turbo源进行编译。

安装NASM

因为libjpeg-turbo的源代码中用到了SIMD汇编指令,所以要编译源代码,就要先安装NASM,NASM全称The Netwide Assembler,是一款基于80x86和x86-64平台的汇编语言编译程序。可以在[sourceforge.net]5的地址下载,也可以在其新的独立官网[nasm.us]6下载

我下的是2.07版本(nasm-2.07-installer.exe),默认安装到C:\Program Files (x86)\NASM,然后把这个位置添加到搜索路径(PATH环境变量)中。
这里写图片描述
环境变量设置好之后,需要reboot或logout。
再次打开电脑,在命令行下执行"set path",显示修改的环境变量已经生效
这里写图片描述

安装CMAKE

去cmake官网(https://cmake.org)下载一个最新版本,解压到本地文件夹,并像安装NASM一样将bin文件夹设置到搜索路径(PATH环境变量)中

安装MinGW

关于windows下mingw的安装网上有很教程,这里不多说了。

CMAKE编译

  1. 源代码解压

将libjpeg-turbo-1.4.2.tar.gz解压到本地文件夹下 (D:\os.package\cpp\libjpeg\libjpeg-turbo-1.4.2)

  1. 创建一个build目录

D:\os.package\cpp\libjpeg>mkdir libjpeg-turbo-1.4.2.prj
D:\os.package\cpp\libjpeg>cd libjpeg-turbo-1.4.2.prj

3.生成Makefile

在创建的build目录下执行:

D:\os.package\cpp\libjpeg\libjpeg-turbo-1.4.2.prj>cmake …\libjpeg-turbo-1.4.2 -G “Eclipse CDT4 - MinGW Makefiles” -DCMAKE_BUILD_TYPE:STRING=RELEASE -DCMAKE_GNUtoMS:BOOL=ON
– The C compiler identification is GNU 5.2.0
– Could not determine Eclipse version, assuming at least 3.6 (Helios). Adjust C
MAKE_ECLIPSE_VERSION if this is wrong.
– Check for working C compiler: P:/MinGW/mingw64/bin/gcc.exe
– Check for working C compiler: P:/MinGW/mingw64/bin/gcc.exe – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– CMAKE_BUILD_TYPE = RELEASE
– VERSION = 1.4.2, BUILD = 20160115
– Arithmetic encoding support enabled
– Arithmetic decoding support enabled
– TurboJPEG C wrapper enabled
– TurboJPEG Java wrapper disabled
– In-memory source/destination managers enabled
– 64-bit build
– Install directory = c:/libjpeg-turbo-gcc64
– Building x86_64 SIMD extensions
– Configuring done
– Generating done
– Build files have been written to: D:/os.package/cpp/libjpeg/libjpeg-turbo-1.4.2.prj

可选项说明:
-G “Eclipse CDT4 - MinGW Makefiles”

指定生成 Eclipse+MinGW格式的工程文件,这样可以在eclipse环境下编译

-DCMAKE_BUILD_TYPE:STRING=RELEASE

设置编译类型为RELEASE,不设置默认也为RELASE

-DCMAKE_GNUtoMS:BOOL=ON

为动态库(DLL)生成MSVC格式的.lib,这样VC编译的项目就可以使用GCC生成的DLL,参见[GNUtoMS]7说明。如果不需要可以不加。

4.编译

执行make,然后就是几分钟的编译过程。。。

D:\os.package\cpp\libjpeg\libjpeg-turbo-1.4.2.prj>make
Scanning dependencies of target simd
[ 0%] Generating jfdctflt-sse-64.obj
[ 1%] Generating jccolor-sse2-64.obj
[ 1%] Generating jcgray-sse2-64.obj
[ 2%] Generating jcsample-sse2-64.obj
[ 2%] Generating jdcolor-sse2-64.obj
[ 2%] Generating jdmerge-sse2-64.obj
[ 3%] Generating jdsample-sse2-64.obj
[ 3%] Generating jfdctfst-sse2-64.obj
[ 4%] Generating jfdctint-sse2-64.obj
[ 4%] Generating jidctflt-sse2-64.obj
[ 5%] Generating jidctfst-sse2-64.obj
[ 5%] Generating jidctint-sse2-64.obj
[ 5%] Generating jidctred-sse2-64.obj
[ 6%] Generating jquantf-sse2-64.obj
[ 6%] Generating jquanti-sse2-64.obj
[ 6%] Built target simd
Scanning dependencies of target jpeg-static
[ 7%] Building C object CMakeFiles/jpeg-static.dir/jcapimin.c.obj
[ 7%] Building C object CMakeFiles/jpeg-static.dir/jcapistd.c.obj
[ 8%] Building C object CMakeFiles/jpeg-static.dir/jccoefct.c.obj
[ 8%] Building C object CMakeFiles/jpeg-static.dir/jccolor.c.obj
[ 9%] Building C object CMakeFiles/jpeg-static.dir/jcdctmgr.c.obj
[ 9%] Building C object CMakeFiles/jpeg-static.dir/jchuff.c.obj
[ 9%] Building C object CMakeFiles/jpeg-static.dir/jcinit.c.obj
[ 10%] Building C object CMakeFiles/jpeg-static.dir/jcmainct.c.obj
[ 10%] Building C object CMakeFiles/jpeg-static.dir/jcmarker.c.obj
[ 11%] Building C object CMakeFiles/jpeg-static.dir/jcmaster.c.obj
[ 11%] Building C object CMakeFiles/jpeg-static.dir/jcomapi.c.obj
[ 12%] Building C object CMakeFiles/jpeg-static.dir/jcparam.c.obj
[ 12%] Building C object CMakeFiles/jpeg-static.dir/jcphuff.c.obj
[ 12%] Building C object CMakeFiles/jpeg-static.dir/jcprepct.c.obj
[ 13%] Building C object CMakeFiles/jpeg-static.dir/jcsample.c.obj
[ 13%] Building C object CMakeFiles/jpeg-static.dir/jctrans.c.obj
[ 14%] Building C object CMakeFiles/jpeg-static.dir/jdapimin.c.obj
[ 14%] Building C object CMakeFiles/jpeg-static.dir/jdapistd.c.obj
[ 15%] Building C object CMakeFiles/jpeg-static.dir/jdatadst.c.obj
[ 15%] Building C object CMakeFiles/jpeg-static.dir/jdatasrc.c.obj
[ 15%] Building C object CMakeFiles/jpeg-static.dir/jdcoefct.c.obj
[ 16%] Building C object CMakeFiles/jpeg-static.dir/jdcolor.c.obj
[ 16%] Building C object CMakeFiles/jpeg-static.dir/jddctmgr.c.obj
[ 17%] Building C object CMakeFiles/jpeg-static.dir/jdhuff.c.obj
[ 17%] Building C object CMakeFiles/jpeg-static.dir/jdinput.c.obj
[ 18%] Building C object CMakeFiles/jpeg-static.dir/jdmainct.c.obj
[ 18%] Building C object CMakeFiles/jpeg-static.dir/jdmarker.c.obj
[ 18%] Building C object CMakeFiles/jpeg-static.dir/jdmaster.c.obj
[ 19%] Building C object CMakeFiles/jpeg-static.dir/jdmerge.c.obj
[ 19%] Building C object CMakeFiles/jpeg-static.dir/jdphuff.c.obj
[ 20%] Building C object CMakeFiles/jpeg-static.dir/jdpostct.c.obj
[ 20%] Building C object CMakeFiles/jpeg-static.dir/jdsample.c.obj
[ 21%] Building C object CMakeFiles/jpeg-static.dir/jdtrans.c.obj
[ 21%] Building C object CMakeFiles/jpeg-static.dir/jerror.c.obj
[ 22%] Building C object CMakeFiles/jpeg-static.dir/jfdctflt.c.obj
[ 22%] Building C object CMakeFiles/jpeg-static.dir/jfdctfst.c.obj
[ 22%] Building C object CMakeFiles/jpeg-static.dir/jfdctint.c.obj
[ 23%] Building C object CMakeFiles/jpeg-static.dir/jidctflt.c.obj
[ 23%] Building C object CMakeFiles/jpeg-static.dir/jidctfst.c.obj
[ 24%] Building C object CMakeFiles/jpeg-static.dir/jidctint.c.obj
[ 24%] Building C object CMakeFiles/jpeg-static.dir/jidctred.c.obj
[ 25%] Building C object CMakeFiles/jpeg-static.dir/jquant1.c.obj
[ 25%] Building C object CMakeFiles/jpeg-static.dir/jquant2.c.obj
[ 25%] Building C object CMakeFiles/jpeg-static.dir/jutils.c.obj
[ 26%] Building C object CMakeFiles/jpeg-static.dir/jmemmgr.c.obj
[ 26%] Building C object CMakeFiles/jpeg-static.dir/jmemnobs.c.obj
[ 27%] Building C object CMakeFiles/jpeg-static.dir/jaricom.c.obj
[ 27%] Building C object CMakeFiles/jpeg-static.dir/jcarith.c.obj
[ 28%] Building C object CMakeFiles/jpeg-static.dir/jdarith.c.obj
[ 28%] Building C object CMakeFiles/jpeg-static.dir/simd/jsimd_x86_64.c.obj
Linking C static library libjpeg.a
[ 28%] Built target jpeg-static
Scanning dependencies of target cjpeg-static
[ 28%] Building C object CMakeFiles/cjpeg-static.dir/cjpeg.c.obj
[ 28%] Building C object CMakeFiles/cjpeg-static.dir/cdjpeg.c.obj
[ 29%] Building C object CMakeFiles/cjpeg-static.dir/rdgif.c.obj
[ 29%] Building C object CMakeFiles/cjpeg-static.dir/rdppm.c.obj
[ 30%] Building C object CMakeFiles/cjpeg-static.dir/rdswitch.c.obj
[ 30%] Building C object CMakeFiles/cjpeg-static.dir/rdbmp.c.obj
[ 31%] Building C object CMakeFiles/cjpeg-static.dir/rdtarga.c.obj
Linking C executable cjpeg-static.exe
[ 31%] Built target cjpeg-static
Scanning dependencies of target djpeg-static
[ 31%] Building C object CMakeFiles/djpeg-static.dir/djpeg.c.obj
[ 32%] Building C object CMakeFiles/djpeg-static.dir/cdjpeg.c.obj
[ 32%] Building C object CMakeFiles/djpeg-static.dir/rdcolmap.c.obj
[ 33%] Building C object CMakeFiles/djpeg-static.dir/rdswitch.c.obj
[ 33%] Building C object CMakeFiles/djpeg-static.dir/wrgif.c.obj
[ 34%] Building C object CMakeFiles/djpeg-static.dir/wrppm.c.obj
[ 34%] Building C object CMakeFiles/djpeg-static.dir/wrbmp.c.obj
[ 34%] Building C object CMakeFiles/djpeg-static.dir/wrtarga.c.obj
Linking C executable djpeg-static.exe
[ 34%] Built target djpeg-static
Scanning dependencies of target jpegtran-static
[ 34%] Building C object CMakeFiles/jpegtran-static.dir/jpegtran.c.obj
[ 35%] Building C object CMakeFiles/jpegtran-static.dir/cdjpeg.c.obj
[ 35%] Building C object CMakeFiles/jpegtran-static.dir/rdswitch.c.obj
[ 35%] Building C object CMakeFiles/jpegtran-static.dir/transupp.c.obj
Linking C executable jpegtran-static.exe
[ 35%] Built target jpegtran-static
Scanning dependencies of target rdjpgcom
[ 36%] Building C object CMakeFiles/rdjpgcom.dir/rdjpgcom.c.obj
Linking C executable rdjpgcom.exe
[ 36%] Built target rdjpgcom
Scanning dependencies of target turbojpeg
[ 37%] Building C object CMakeFiles/turbojpeg.dir/turbojpeg.c.obj
[ 37%] Building C object CMakeFiles/turbojpeg.dir/transupp.c.obj
[ 37%] Building C object CMakeFiles/turbojpeg.dir/jdatadst-tj.c.obj
[ 38%] Building C object CMakeFiles/turbojpeg.dir/jdatasrc-tj.c.obj
Linking C shared library libturbojpeg.dll
Setting environment for using Microsoft Visual Studio 2010 x64 tools.

Microsoft ® Library Manager Version 10.00.30319.01

Copyright © Microsoft Corporation. All rights reserved.

正在创建库 libturbojpeg.lib 和对象 libturbojpeg.exp

[ 38%] Built target turbojpeg
Scanning dependencies of target tjbench
[ 39%] Building C object CMakeFiles/tjbench.dir/tjbench.c.obj
[ 39%] Building C object CMakeFiles/tjbench.dir/bmp.c.obj
[ 40%] Building C object CMakeFiles/tjbench.dir/tjutil.c.obj
[ 40%] Building C object CMakeFiles/tjbench.dir/rdbmp.c.obj
[ 40%] Building C object CMakeFiles/tjbench.dir/rdppm.c.obj
[ 41%] Building C object CMakeFiles/tjbench.dir/wrbmp.c.obj
[ 41%] Building C object CMakeFiles/tjbench.dir/wrppm.c.obj
Linking C executable tjbench.exe
[ 41%] Built target tjbench
Scanning dependencies of target turbojpeg-static
[ 41%] Building C object CMakeFiles/turbojpeg-static.dir/jcapimin.c.obj
[ 42%] Building C object CMakeFiles/turbojpeg-static.dir/jcapistd.c.obj
[ 42%] Building C object CMakeFiles/turbojpeg-static.dir/jccoefct.c.obj
[ 43%] Building C object CMakeFiles/turbojpeg-static.dir/jccolor.c.obj
[ 43%] Building C object CMakeFiles/turbojpeg-static.dir/jcdctmgr.c.obj
[ 43%] Building C object CMakeFiles/turbojpeg-static.dir/jchuff.c.obj
[ 44%] Building C object CMakeFiles/turbojpeg-static.dir/jcinit.c.obj
[ 44%] Building C object CMakeFiles/turbojpeg-static.dir/jcmainct.c.obj
[ 45%] Building C object CMakeFiles/turbojpeg-static.dir/jcmarker.c.obj
[ 45%] Building C object CMakeFiles/turbojpeg-static.dir/jcmaster.c.obj
[ 46%] Building C object CMakeFiles/turbojpeg-static.dir/jcomapi.c.obj
[ 46%] Building C object CMakeFiles/turbojpeg-static.dir/jcparam.c.obj
[ 46%] Building C object CMakeFiles/turbojpeg-static.dir/jcphuff.c.obj
[ 47%] Building C object CMakeFiles/turbojpeg-static.dir/jcprepct.c.obj
[ 47%] Building C object CMakeFiles/turbojpeg-static.dir/jcsample.c.obj
[ 48%] Building C object CMakeFiles/turbojpeg-static.dir/jctrans.c.obj
[ 48%] Building C object CMakeFiles/turbojpeg-static.dir/jdapimin.c.obj
[ 49%] Building C object CMakeFiles/turbojpeg-static.dir/jdapistd.c.obj
[ 49%] Building C object CMakeFiles/turbojpeg-static.dir/jdatadst.c.obj
[ 49%] Building C object CMakeFiles/turbojpeg-static.dir/jdatasrc.c.obj
[ 50%] Building C object CMakeFiles/turbojpeg-static.dir/jdcoefct.c.obj
[ 50%] Building C object CMakeFiles/turbojpeg-static.dir/jdcolor.c.obj
[ 51%] Building C object CMakeFiles/turbojpeg-static.dir/jddctmgr.c.obj
[ 51%] Building C object CMakeFiles/turbojpeg-static.dir/jdhuff.c.obj
[ 52%] Building C object CMakeFiles/turbojpeg-static.dir/jdinput.c.obj
[ 52%] Building C object CMakeFiles/turbojpeg-static.dir/jdmainct.c.obj
[ 52%] Building C object CMakeFiles/turbojpeg-static.dir/jdmarker.c.obj
[ 53%] Building C object CMakeFiles/turbojpeg-static.dir/jdmaster.c.obj
[ 53%] Building C object CMakeFiles/turbojpeg-static.dir/jdmerge.c.obj
[ 54%] Building C object CMakeFiles/turbojpeg-static.dir/jdphuff.c.obj
[ 54%] Building C object CMakeFiles/turbojpeg-static.dir/jdpostct.c.obj
[ 55%] Building C object CMakeFiles/turbojpeg-static.dir/jdsample.c.obj
[ 55%] Building C object CMakeFiles/turbojpeg-static.dir/jdtrans.c.obj
[ 55%] Building C object CMakeFiles/turbojpeg-static.dir/jerror.c.obj
[ 56%] Building C object CMakeFiles/turbojpeg-static.dir/jfdctflt.c.obj
[ 56%] Building C object CMakeFiles/turbojpeg-static.dir/jfdctfst.c.obj
[ 57%] Building C object CMakeFiles/turbojpeg-static.dir/jfdctint.c.obj
[ 57%] Building C object CMakeFiles/turbojpeg-static.dir/jidctflt.c.obj
[ 58%] Building C object CMakeFiles/turbojpeg-static.dir/jidctfst.c.obj
[ 58%] Building C object CMakeFiles/turbojpeg-static.dir/jidctint.c.obj
[ 58%] Building C object CMakeFiles/turbojpeg-static.dir/jidctred.c.obj
[ 59%] Building C object CMakeFiles/turbojpeg-static.dir/jquant1.c.obj
[ 59%] Building C object CMakeFiles/turbojpeg-static.dir/jquant2.c.obj
[ 60%] Building C object CMakeFiles/turbojpeg-static.dir/jutils.c.obj
[ 60%] Building C object CMakeFiles/turbojpeg-static.dir/jmemmgr.c.obj
[ 61%] Building C object CMakeFiles/turbojpeg-static.dir/jmemnobs.c.obj
[ 61%] Building C object CMakeFiles/turbojpeg-static.dir/jaricom.c.obj
[ 61%] Building C object CMakeFiles/turbojpeg-static.dir/jcarith.c.obj
[ 62%] Building C object CMakeFiles/turbojpeg-static.dir/jdarith.c.obj
[ 62%] Building C object CMakeFiles/turbojpeg-static.dir/simd/jsimd_x86_64.c.obj
[ 63%] Building C object CMakeFiles/turbojpeg-static.dir/turbojpeg.c.obj
[ 63%] Building C object CMakeFiles/turbojpeg-static.dir/transupp.c.obj
[ 64%] Building C object CMakeFiles/turbojpeg-static.dir/jdatadst-tj.c.obj
[ 64%] Building C object CMakeFiles/turbojpeg-static.dir/jdatasrc-tj.c.obj
Linking C static library libturbojpeg.a
[ 64%] Built target turbojpeg-static
Scanning dependencies of target tjbench-static
[ 65%] Building C object CMakeFiles/tjbench-static.dir/tjbench.c.obj
[ 65%] Building C object CMakeFiles/tjbench-static.dir/bmp.c.obj
[ 66%] Building C object CMakeFiles/tjbench-static.dir/tjutil.c.obj
[ 66%] Building C object CMakeFiles/tjbench-static.dir/rdbmp.c.obj
[ 66%] Building C object CMakeFiles/tjbench-static.dir/rdppm.c.obj
[ 67%] Building C object CMakeFiles/tjbench-static.dir/wrbmp.c.obj
[ 67%] Building C object CMakeFiles/tjbench-static.dir/wrppm.c.obj
Linking C executable tjbench-static.exe
[ 67%] Built target tjbench-static
Scanning dependencies of target tjunittest
[ 68%] Building C object CMakeFiles/tjunittest.dir/tjunittest.c.obj
[ 68%] Building C object CMakeFiles/tjunittest.dir/tjutil.c.obj
Linking C executable tjunittest.exe
[ 68%] Built target tjunittest
Scanning dependencies of target tjunittest-static
[ 69%] Building C object CMakeFiles/tjunittest-static.dir/tjunittest.c.obj
[ 69%] Building C object CMakeFiles/tjunittest-static.dir/tjutil.c.obj
Linking C executable tjunittest-static.exe
[ 69%] Built target tjunittest-static
Scanning dependencies of target wrjpgcom
[ 70%] Building C object CMakeFiles/wrjpgcom.dir/wrjpgcom.c.obj
Linking C executable wrjpgcom.exe
[ 70%] Built target wrjpgcom
Scanning dependencies of target jpeg
[ 70%] Building C object sharedlib/CMakeFiles/jpeg.dir//jcapimin.c.obj
[ 71%] Building C object sharedlib/CMakeFiles/jpeg.dir/
/jcapistd.c.obj
[ 71%] Building C object sharedlib/CMakeFiles/jpeg.dir//jccoefct.c.obj
[ 72%] Building C object sharedlib/CMakeFiles/jpeg.dir/
/jccolor.c.obj
[ 72%] Building C object sharedlib/CMakeFiles/jpeg.dir//jcdctmgr.c.obj
[ 72%] Building C object sharedlib/CMakeFiles/jpeg.dir/
/jchuff.c.obj
[ 73%] Building C object sharedlib/CMakeFiles/jpeg.dir//jcinit.c.obj
[ 73%] Building C object sharedlib/CMakeFiles/jpeg.dir/
/jcmainct.c.obj
[ 74%] Building C object sharedlib/CMakeFiles/jpeg.dir//jcmarker.c.obj
[ 74%] Building C object sharedlib/CMakeFiles/jpeg.dir/
/jcmaster.c.obj
[ 75%] Building C object sharedlib/CMakeFiles/jpeg.dir//jcomapi.c.obj
[ 75%] Building C object sharedlib/CMakeFiles/jpeg.dir/
/jcparam.c.obj
[ 75%] Building C object sharedlib/CMakeFiles/jpeg.dir//jcphuff.c.obj
[ 76%] Building C object sharedlib/CMakeFiles/jpeg.dir/
/jcprepct.c.obj
[ 76%] Building C object sharedlib/CMakeFiles/jpeg.dir//jcsample.c.obj
[ 77%] Building C object sharedlib/CMakeFiles/jpeg.dir/
/jctrans.c.obj
[ 77%] Building C object sharedlib/CMakeFiles/jpeg.dir//jdapimin.c.obj
[ 78%] Building C object sharedlib/CMakeFiles/jpeg.dir/
/jdapistd.c.obj
[ 78%] Building C object sharedlib/CMakeFiles/jpeg.dir//jdatadst.c.obj
[ 78%] Building C object sharedlib/CMakeFiles/jpeg.dir/
/jdatasrc.c.obj
[ 79%] Building C object sharedlib/CMakeFiles/jpeg.dir//jdcoefct.c.obj
[ 79%] Building C object sharedlib/CMakeFiles/jpeg.dir/
/jdcolor.c.obj
[ 80%] Building C object sharedlib/CMakeFiles/jpeg.dir//jddctmgr.c.obj
[ 80%] Building C object sharedlib/CMakeFiles/jpeg.dir/
/jdhuff.c.obj
[ 81%] Building C object sharedlib/CMakeFiles/jpeg.dir//jdinput.c.obj
[ 81%] Building C object sharedlib/CMakeFiles/jpeg.dir/
/jdmainct.c.obj
[ 82%] Building C object sharedlib/CMakeFiles/jpeg.dir//jdmarker.c.obj
[ 82%] Building C object sharedlib/CMakeFiles/jpeg.dir/
/jdmaster.c.obj
[ 82%] Building C object sharedlib/CMakeFiles/jpeg.dir//jdmerge.c.obj
[ 83%] Building C object sharedlib/CMakeFiles/jpeg.dir/
/jdphuff.c.obj
[ 83%] Building C object sharedlib/CMakeFiles/jpeg.dir//jdpostct.c.obj
[ 84%] Building C object sharedlib/CMakeFiles/jpeg.dir/
/jdsample.c.obj
[ 84%] Building C object sharedlib/CMakeFiles/jpeg.dir//jdtrans.c.obj
[ 85%] Building C object sharedlib/CMakeFiles/jpeg.dir/
/jerror.c.obj
[ 85%] Building C object sharedlib/CMakeFiles/jpeg.dir//jfdctflt.c.obj
[ 85%] Building C object sharedlib/CMakeFiles/jpeg.dir/
/jfdctfst.c.obj
[ 86%] Building C object sharedlib/CMakeFiles/jpeg.dir//jfdctint.c.obj
[ 86%] Building C object sharedlib/CMakeFiles/jpeg.dir/
/jidctflt.c.obj
[ 87%] Building C object sharedlib/CMakeFiles/jpeg.dir//jidctfst.c.obj
[ 87%] Building C object sharedlib/CMakeFiles/jpeg.dir/
/jidctint.c.obj
[ 88%] Building C object sharedlib/CMakeFiles/jpeg.dir//jidctred.c.obj
[ 88%] Building C object sharedlib/CMakeFiles/jpeg.dir/
/jquant1.c.obj
[ 88%] Building C object sharedlib/CMakeFiles/jpeg.dir//jquant2.c.obj
[ 89%] Building C object sharedlib/CMakeFiles/jpeg.dir/
/jutils.c.obj
[ 89%] Building C object sharedlib/CMakeFiles/jpeg.dir//jmemmgr.c.obj
[ 90%] Building C object sharedlib/CMakeFiles/jpeg.dir/
/jmemnobs.c.obj
[ 90%] Building C object sharedlib/CMakeFiles/jpeg.dir//jaricom.c.obj
[ 91%] Building C object sharedlib/CMakeFiles/jpeg.dir/
/jcarith.c.obj
[ 91%] Building C object sharedlib/CMakeFiles/jpeg.dir//jdarith.c.obj
[ 91%] Building C object sharedlib/CMakeFiles/jpeg.dir/
/simd/jsimd_x86_64.c.obj
Linking C shared library libjpeg-62.dll
Setting environment for using Microsoft Visual Studio 2010 x64 tools.

Microsoft ® Library Manager Version 10.00.30319.01

Copyright © Microsoft Corporation. All rights reserved.

正在创建库 libjpeg.lib 和对象 libjpeg.exp

[ 91%] Built target jpeg
Scanning dependencies of target cjpeg
[ 91%] Building C object sharedlib/CMakeFiles/cjpeg.dir//cjpeg.c.obj
[ 91%] Building C object sharedlib/CMakeFiles/cjpeg.dir/
/cdjpeg.c.obj
[ 92%] Building C object sharedlib/CMakeFiles/cjpeg.dir//rdgif.c.obj
[ 92%] Building C object sharedlib/CMakeFiles/cjpeg.dir/
/rdppm.c.obj
[ 93%] Building C object sharedlib/CMakeFiles/cjpeg.dir//rdswitch.c.obj
[ 93%] Building C object sharedlib/CMakeFiles/cjpeg.dir/
/rdbmp.c.obj
[ 94%] Building C object sharedlib/CMakeFiles/cjpeg.dir//rdtarga.c.obj
Linking C executable cjpeg.exe
[ 94%] Built target cjpeg
Scanning dependencies of target djpeg
[ 94%] Building C object sharedlib/CMakeFiles/djpeg.dir/
/djpeg.c.obj
[ 94%] Building C object sharedlib/CMakeFiles/djpeg.dir//cdjpeg.c.obj
[ 95%] Building C object sharedlib/CMakeFiles/djpeg.dir/
/rdcolmap.c.obj
[ 95%] Building C object sharedlib/CMakeFiles/djpeg.dir//rdswitch.c.obj
[ 96%] Building C object sharedlib/CMakeFiles/djpeg.dir/
/wrgif.c.obj
[ 96%] Building C object sharedlib/CMakeFiles/djpeg.dir//wrppm.c.obj
[ 97%] Building C object sharedlib/CMakeFiles/djpeg.dir/
/wrbmp.c.obj
[ 97%] Building C object sharedlib/CMakeFiles/djpeg.dir//wrtarga.c.obj
Linking C executable djpeg.exe
[ 97%] Built target djpeg
Scanning dependencies of target jcstest
[ 98%] Building C object sharedlib/CMakeFiles/jcstest.dir/
/jcstest.c.obj
Linking C executable jcstest.exe
[ 98%] Built target jcstest
Scanning dependencies of target jpegtran
[ 98%] Building C object sharedlib/CMakeFiles/jpegtran.dir//jpegtran.c.obj
[ 99%] Building C object sharedlib/CMakeFiles/jpegtran.dir/
/cdjpeg.c.obj
[ 99%] Building C object sharedlib/CMakeFiles/jpegtran.dir//rdswitch.c.obj
[100%] Building C object sharedlib/CMakeFiles/jpegtran.dir/
/transupp.c.obj
Linking C executable jpegtran.exe
[100%] Built target jpegtran

编译完成之后所有的生成文件都在build文件夹的根目录下
这里写图片描述

jpeg 编解码系列文章

《mingw(gcc)编译libjpeg-turbo》
《libjpeg:实现jpeg内存压缩暨error_exit错误异常处理和个性化参数设置》
《libjpeg:实现jpeg内存解压缩塈转换色彩空间/压缩分辨率》
《libjpeg:读取jpeg头获取图像基本信息(jpeg_read_header)》
《nmake(vs2015)命令行编译libjpeg-turbo(x86/amd64)》

jpeg2000 编码系列文章

《mingw(gcc)编译openjpeg》
《VS2015编译openjpeg(32/64位)》
《openjpeg:解决静态链接时未定义引用错误:undefined reference to `__imp_opj_xxxxxxx‘》
《jpeg2000(j2k)图像编码解码:c++实现openjpeg内存流接口(memory stream)》
《openjpeg:jpeg2000(j2k)图像内存压缩编码》
《openjpeg:jpeg2000(j2k)图像内存解压缩(解码)》
《cmake设置msvc的运行库(runtime library)塈指定openjpeg使用静态库》


  1. http://libjpeg-turbo.virtualgl.org/ ↩︎

  2. http://www.ijg.org/ ↩︎

  3. http://sourceforge.net/projects/libjpeg-turbo/files/?source=navbar ↩︎

  4. http://sourceforge.net/projects/libjpeg-turbo/files/1.4.2/ ↩︎

  5. http://sourceforge.net/projects/nasm/ ↩︎

  6. http://www.nasm.us/pub/nasm/releasebuilds/?C=M;O=D ↩︎

  7. https://cmake.org/cmake/help/v3.1/prop_tgt/GNUtoMS.html ↩︎

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

10km

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值