Well I got it to build pretty easily. but it didn’t work as a dll for me AT ALL.
First I tried the easy way and got the prebuilt binaries. But I kept getting this error:
Unhandled exception at 0x7d64d233 in Using_libpng.exe: 0xC0000005: Access violation writing location 0x00000014.
The answer (from the second thread posting) that I believe it to be a correct synopsis of the root cause was:
So you pass the FILE* from fopen to png_init_io which will cause libpng
itself to make fread() calls on that FILE*. If libpng then crashes in
png_read_info it means that the library you used to allocate the FILE* (i.e.
the one containing the implementation of fopen which was called in (1)) is
*not* the same as the library libpng expects to call to read from the FILE*
(i.e. the library libpng.so was compiled/linked against to get the
implementation of fread).
If you can”t change your library to match libpng and you don”t want to
compile and build libpng (statically) to change it then you have no choice
but to implement your own file IO and hope that there are no other issues (I
believe that file IO with stdio is the *only* case where an object is
allocated in the application and subject to library calls within libpng.)
basically he’s saying that libpng was built using a “different version” of file reading capability than what you have on your machine.
Probably true because i’m running the accursed x64 edition of winxp pro.
so i set out to compile my own libpng
Finally got it into a
(which you can download! see I am nice!), this may help you if you can’t get it to work still.
So I built it as a big hunking .lib file (800k!) and it works now. So fuck it, I don’t care how big it is, it works, and I don’t have to worry about dll’s.
This is a nice library now, once I can get it to build.
Treating windows developers badly is not cool, btw, png team.