Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Here is how I've built libjpeg using MinGW on Windows :</p> <h2>1. Get MinGW with MSYS</h2> <p>I've got a copy from <a href="http://sourceforge.net/projects/mingw/">http://sourceforge.net/projects/mingw/</a>. Quoting from www.mingw.org :</p> <blockquote> <p>MSYS is a collection of GNU utilities such as bash, make, gawk and grep to allow building of applications and programs which depend on traditionally UNIX tools to be present.</p> </blockquote> <p>We will need it to run the <code>configure</code> script that comes with libjpeg sources.</p> <p><br></p> <h2>2. Get libjpeg sources</h2> <p>From <a href="http://www.ijg.org/">http://www.ijg.org/</a>, take the Unix format package (the Windows one won't work with this procedure). I took the <code>jpeg_8d</code> version.</p> <p><br></p> <h2>3. Prepare a building directory</h2> <p>I've made a temporary directory named <code>tmp</code> in <code>D:\</code>, but you could choose whatever suits your needs. The thing that matters is the name of paths in MSYS. As it brings some * <em>Unixity</em> * to Windows, paths cannot be used in their original form. In a nutshell:</p> <p><code>C:\path\to\file</code> becomes <code>/c/path/to/file</code> in MSYS land, an so <code>D:\tmp</code> becomes <code>/d/tmp</code>.</p> <p>Decompress the libjpeg sources in <code>D:\tmp</code>, so you have a <code>jpeg-8d</code> directory in there.</p> <p>Create a <code>jpeg-build</code> directory inside <code>D:\tmp</code>, it will hold the built library.</p> <p>Now everything is ready for the build.</p> <p><br></p> <h2>4. ./configure, make, make install</h2> <p>That is the mantra of building in Unix land. An option should be added to redirect the install process to <code>D:\tmp\jpeg-build</code>.</p> <p>Run the following commands in an MSYS shell (also named MinGW shell in Windows start menu):</p> <pre><code>cd /d/tmp/jpeg-8d ./configure --prefix=/d/tmp/jpeg-build make make install </code></pre> <p>As an additional step, you can run <code>make test</code> for safety.</p> <p>These commands will build both static and shared versions of libjpeg.</p> <p><br></p> <h2>5. Take the goods, delete the temporaries</h2> <p>If everything runs fine, you can delete the <code>D:\tmp\jpeg-8d</code> directory, but keep the <code>jpeg-build</code> one. It contains:</p> <ul> <li>an <code>include</code> directory, containing libjpeg headers. You can move them to your compiler's headers directory.</li> <li>a <code>lib</code> directory, with <code>.a</code> file to pass to the linker. You can move them to your compiler's library directory.</li> <li>a <code>bin</code> directory, holding the libjpeg shared library <code>libjpeg-8.dll</code> and jpeg tools.</li> <li>a <code>share</code> directory, containing <code>man</code> pages for the jpeg tools.</li> </ul> <p>You can now build your program and link it against libjpeg by indicating the right include and library paths.</p> <p><br></p> <p>You can find many details about the libjpeg building and installation process in <code>install.txt</code> inside the source package.</p> <p>I hope this will be useful.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload