When building libpng 1.2.18 as a dll using MSVC 8 it doesn't export an import library when building with PNG_BUILD_DLL defined. After looking around pngconf.h it appears that line 1303 which reads:
#if !defined(PNG_IMPEXP) && defined(PNG_BUILD_DLL) && !defined(PNG_NO_MODULEDEF)
should perhaps read
#if !defined(PNG_IMPEXP) && defined(PNG_BUILD_DLL) && defined(PNG_NO_MODULEDEF)
I'm not sure as I see no documentation on the function or intent of MODULEDEF but the current version is causing PNG_IMPEXP to be defined to nothing and which means nothing is exported and the VC linker helpfully skips generating the import lib which breaks my build.