Compiling Libpng on Windows 7 or holding Libpng12.dll (and understanding how to link DLLs in VS)

I am using Libpng15 on Windows 7, but I am getting errors regarding

Unresolved external error _png_set_longjmp_fn when compiling my code. I followed the directions in the above link, and although it compiled without any errors, I received a message stating that I needed libpng12.dll to continue.

So, I did some Googling for libpng12.dll ... nothing appeared, but the common sites "find x.dll", which, as it turned out, were scammers.

I tried reading INSTALL docs for the libpng source code on my website, and all I see is instructions on how to do this through Unix based systems. I tried to do this in Cygwin with no luck, so I was kind of stuck on how to compile this library.

In general, I am ready to either compile or just use the .dll, although the problem is that I can not find a working DLL for version 12.

Another thing I tried was downloading the binaries from here , which allegedly was "libpng12 for windows". Then I copied the files to my VC compiler directory, which, in my opinion, overloads libpng15. However, when I put the link to it statically and run my program in VC, it says that I need a .DLL file. The file libpng12.dll was actually .dll.a . I'm honestly not sure to link them (I tried linking it statically by typing "libpng12.dll.a" in the Linker Input setting via VS).

If I can go .dll for libpng12, how to do it? Where is the file located? How to link it in VS?

Any help would be appreciated, as there seems to be really not much information about this. Either that, or I just don't look right.

+4
source share
4 answers

Look in the "projects" directory of the libpng distribution and use one of the visual projects.

+4
source

This youtube can help you "Create a libpng library using VS2010"

https://www.youtube.com/watch?v=7XxVebzK3ac

+1
source

This link apparently has an installer for 1.2:

http://gnuwin32.sourceforge.net/packages/libpng.htm

he is 32 bit. Not sure if that matters to you.

0
source

As mentioned above Look in the "projects" directory of the libpng distribution

Then make the settings described here fooobar.com/questions/223808 / ...

What am I here to simplify (as indicated there) by adding two lib values ​​to

  • Config β†’ Linker β†’ Input β†’ Additional Dependencies

these values ​​are ucrt.lib;vcruntime.lib

Build Type / MD

Allows me to create these old versions and fix this error in Windows 10 VS2015.

0
source

All Articles