Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Message-ID: <002b01c07543$1b93bee0$8b0c4ea8@kepri.re.kr>
From: "Jong B. Lee" <jbdoll@kepri.re.kr>
To: "cygwin" <cygwin@cygwin.com>
Cc: <cwilson@ece.gatech.edu>
Subject: libpng  problem  --  png_read_destroy
Date: Wed, 3 Jan 2001 14:07:43 +0900
MIME-Version: 1.0
Content-Type: text/plain;
	charset="ks_c_5601-1987"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id AAA02424

Happy New Year !!

I'm writing a program using png library.

But, gcc complains that   png_read_destroy  and  png_write_destroy  are  undefined.

How can I fix it?

I have the latest and clean cygwin installed.

Here's a sample c file and link error :

------------------------------------
/* sample   png.c */
#include <png.h>

int main()
{
   #ifdef __CYGWIN__
   #define PNG_STATIC
   #endif

   png_structp pp;
   png_infop info;
   png_read_end(pp, info);
   png_read_destroy(pp, info, NULL);
   png_write_destroy (pp);
   
   return 0;
}
-------------------------------------
$ gcc -W -g png.c  -lpng  -o png

/c/WINDOWS/TEMP/ccFXASfF.o(.text+0x30): undefined reference to `png_read_destroy'
/c/WINDOWS/TEMP/ccFXASfF.o(.text+0x3f): undefined reference to `png_write_destroy'
collect2: ld returned 1 exit status
===============================

