This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [ANNOUNCEMENT] Updated: libpng-1.0.9-3


Charles Wilson wrote:
> 
> Can't be done.  (Well, you have to hack pngcrush.c pretty heavily -- and
> probably have to custom-build a libpng.dll).  The problem is that
> pngcrush is not really an "external" program -- it's developed by one of
> the main forces in libpng development, and uses non-exported functions
> from the library.  This doesn't matter on unix with shared libs (there
> are no "hidden" functions) and it doesn't matter with static libs.  But
> with windows dll's it makes a difference.

Well, actually this might not work with 1.0.9 on any platform.  From
pngconf.h (and pngcrush.c #define's PNG_INTERNAL):


#ifdef PNG_INTERNAL
#include <stdlib.h>
/* The functions exported by PNG_EXTERN are PNG_INTERNAL functions,
which
 * aren't usually used outside the library (as far as I know), so it is
 * debatable if they should be exported at all.  In the future, when it
is
 * possible to have run-time registry of chunk-handling functions, some
of
 * these will be made available again.
#define PNG_EXTERN extern
 */
#define PNG_EXTERN

Guess how all your missing functions are declared?  Yup -- PNG_EXTERN. 
So not only are they not __declspec(dllimport/dllexport), they aren't
even extern'ed.

--Chuck

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]