1. Download source code: http://www.ijg.org/files/,
Select the latest version of the Windows version of the zip package to download.
Jpegsr9a.zip 1042 Kb Sun Jan 10:26:10 Zip compressed Data
2, unzip the compressed package, modify the file name Jconfig.vc to Jconfig.h
3. Open the VS2010 command Line window
Program Menu
Microsoft Visual Studio 2010
----Visual Studio Tools
--------Visual Studio Command Prompt (2010)
4. Command-line window, enter the directory after Jpeglib decompression
CD C:\jpeg-9
5. Command line window, compile jpeglib, generate Libjpeg.lib
nmake/f MAKEFILE.VC
6. Using Jpeglib
Add the Jpeglib directory to the project's [additional include directory],
Add the Jpeglib directory to the project's [additional Library directory],
Add Libjpeg.lib to the project's [Additional dependencies],
You can use Jpeglib in your project.
7. Precautions
Libjpeg.lib was developed in C language,
If used in a C + + program, it needs to be included with extern "C" {}.
As follows:
extern "C"
{
#include "Jpeglib.h"
}
Use VS2010 to compile jpeglib under Windows