Use VS2010 to compile jpeglib under Windows

Source: Internet
Author: User
Tags visual studio 2010

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.