Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <3C3DD155.5010108@ece.gatech.edu> Date: Thu, 10 Jan 2002 12:37:25 -0500 From: Charles Wilson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2 X-Accept-Language: en-us MIME-Version: 1.0 To: "Gerrit P. Haase" CC: cygwin AT cygwin DOT com Subject: Re: libpng problems with png_info_init, png_read_destroy References: <757896744 DOT 20020110124749 AT familiehaase DOT de> <1799332659 DOT 20020110131145 AT familiehaase DOT de> <20020110145308 DOT A7436 AT infosat DOT net> <13712653054 DOT 20020110140705 AT familiehaase DOT de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 'man libpng' reveals: png_read_init ---> png_create_read_struct png_write_init ---> png_create_write_struct png_info_init --> png_create_info_struct png_read_destroy --> png_destroy_read_struct png_write_destroy --> png_destroy_write_struct The old methods have been deprecated. They are currently marked INTERNAL and are not exported by the DLL, but will be completely removed in the libpng-2.0.0 release. If you MUST continue to use the old methods, then you should -DPNG_STATIC -DZLIB_STATIC when compiling, and -static when linking. --Chuck Gerrit P. Haase wrote: > Jean, > > 2002-01-10 14:01:30, du schriebst: > > >>Perhaps this time I can ofer my two cents worth ;) >> > >>>>Hallo Cygwinners, >>>> >>>>I'm getting these undefined references when linking against >>>>libjpeg import lib: >>>> >>>Waddaza want? Wanted to say> libpng import lib >>> >>> >>>>/stuff/test/mMosaic-src-3.7.2/src/readPNG.c:79: undefined reference to `png_read_destroy' >>>>/stuff/test/mMosaic-src-3.7.2/src/readPNG.c:94: undefined reference to `png_info_init' >>>>/stuff/test/mMosaic-src-3.7.2/src/readPNG.c:286: undefined reference to `png_read_destroy' >>>> >>>>Are there a known workaround besides linking the libs statically? >>>> > >>Since you are using .c, I presume that you are including the source >>and that the .c files do not contain the declerations, but only the >>implmentations of the code. Errors like your's if freuently >>encountered when forgetting to include a header file. Make sure that >>you are not looking for /stuff/test/mMosaic-src-3.7.2/src/readPNG.h >>instead. >> > >>It appears that you want to rather include the .h files and add the >>relevant lib in your link-line. >> > > No, the problem is that these functions are private and are not exported > from the dll lib, so I need to link libpng staticallz to get the > functions, but I want to link against the dynamic lib. > > I found one reference in the archives how to substitute png_info_init > with png_create_info_struct() but nothing about png_read_destroy(). > > > Anyway, thank you for your comment, please keep communication on the > cygwin list as long as it is ontopic there. > > Gerrit > -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/