how to install libjpeg for windows?

21,679

You should also download the "binaries" and "dependencies" packages from the GnuWin32 site. The jpeg62.dll is in the bin directory of the "binaries" archive.

A .lib file isn't always a complete static library, it can also be an import library for a dll which then must be present when the program is run.

Share:
21,679

Related videos on Youtube

lezebulon
Author by

lezebulon

Updated on May 28, 2020

Comments

  • lezebulon
    lezebulon almost 4 years

    I downloaded some code that make use of libjpeg, but no dlls in the source files are included, and I'm trying to make it compile / execute correctly.

    I am using VS2010: in my source files I have #include "jpeglib.h" and in Linker > Input > Additional Dependencies I have jpeg.lib, both of which can't be found on my computer.

    I managed to go here : http://gnuwin32.sourceforge.net/packages/jpeg.htm and downloaded the "developer files" archives, which indeed contains the header and the .lib file. The programs compiles fine, but when I execute the .exe I have a jpeg62.dll missing error that I don't understand.

    How am I supposed to solve this?

    First off, I couldn't find any jpeg62.dll file on the previous website.

    Secondly, I wonder why I need a dll since I thought that using .lib files for the link meant that I wouldn't need dlls for my programm to run. Any help is appreciated

  • Vahagn Tumanyan
    Vahagn Tumanyan about 8 years
    I know this is a fairly old question, but I'd be glad if you help me. Why is it called jpeg62.dll and not jpeg.dll? Is jpeg.lib pointing to it? turbojpeg.dll exists though.
  • alexisdm
    alexisdm about 8 years
    @VahagnTumanyan Because on Windows you can't have multiple incompatible versions of the same library sharing the same name like the ".so" on unix, with the version, 6.2, as part of the name, you could use the v6 library simultaneously with the latest v9. jpeg.lib points to jpeg62.dll and turbojpeg.dll is supposed to be ABI compatible with the libjpeg v6b library (according to wikipedia ), so renaming it to jpeg62.dll might work.