public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
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: Tue, 02 Jan 2001 21:06:00 -0000	[thread overview]
Message-ID: <002b01c07543$1b93bee0$8b0c4ea8@kepri.re.kr> (raw)

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
===============================

             reply	other threads:[~2001-01-02 21:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-02 21:06 Jong B. Lee [this message]
2001-01-02 21:45 ` Charles Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='002b01c07543$1b93bee0$8b0c4ea8@kepri.re.kr' \
    --to=jbdoll@kepri.re.kr \
    --cc=cwilson@ece.gatech.edu \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).