www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <f9c911e10710020834j678b1ddfn55ef7b8e04119ba3@mail.gmail.com> |
Date: | Tue, 2 Oct 2007 23:34:24 +0800 |
From: | valpassing <valpassing AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Why I cannot build my own program in Cygwin when using libpng function???? |
In-Reply-To: | <f9c911e10710020832k4bb2b40cl88dec405bbf40b78@mail.gmail.com> |
MIME-Version: | 1.0 |
References: | <f9c911e10710020832k4bb2b40cl88dec405bbf40b78 AT mail DOT gmail DOT com> |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Hi, I installed libpng in cygwin. then I include png.h in my files, and use many fucntions provided by libpng. But when I compile it, it reports: xiaodwan AT xiaodwan-wxp ~/Desktop//pix $ gcc -lpng12 -lz -I/usr/include/libpng12 -o ref ref.c /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o:ref.c:(.text+0x37): undefined reference to `_ png_check_sig' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o:ref.c:(.text+0x6b): undefined reference to `_ png_create_read_struct' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o:ref.c: (.text+0x92): undefined reference to `_ png_create_info_struct' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o:ref.c:(.text+0xbc): undefined reference to `_ png_destroy_read_struct' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o: ref.c:(.text+0xf5): undefined reference to `_ png_destroy_read_struct' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o:ref.c:(.text+0x115): undefined reference to ` _png_init_io' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o: ref.c:(.text+0x12a): undefined reference to ` _png_set_sig_bytes' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o:ref.c:(.text+0x140): undefined reference to ` _png_read_info' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o: ref.c:(.text+0x18e): undefined reference to ` _png_get_IHDR' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o:ref.c:(.text+0x1e3): undefined reference to ` _png_destroy_read_struct' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o: ref.c:(.text+0x20d): undefined reference to ` _png_get_valid' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o:ref.c:(.text+0x23a): undefined reference to ` _png_get_bKGD' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o: ref.c:(.text+0x397): undefined reference to ` _png_destroy_read_struct' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o:ref.c:(.text+0x3b9): undefined reference to ` _png_set_palette_to_rgb' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o: ref.c:(.text+0x3d8): undefined reference to ` _png_set_gray_1_2_4_to_8' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o:ref.c:(.text+0x3f6): undefined reference to ` _png_get_valid' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o: ref.c:(.text+0x407): undefined reference to ` _png_set_tRNS_to_alpha' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o:ref.c:(.text+0x41d): undefined reference to ` _png_set_strip_16' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o: ref.c:(.text+0x433): undefined reference to ` _png_set_packing' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o:ref.c:(.text+0x45a): undefined reference to ` _png_set_gray_to_rgb' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o: ref.c:(.text+0x49e): undefined reference to ` _png_set_rgb_to_gray_fixed' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o:ref.c:(.text+0x4b4): undefined reference to ` _png_read_update_info' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o: ref.c:(.text+0x4cd): undefined reference to ` _png_get_rowbytes' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o:ref.c:(.text+0x4ee): undefined reference to ` _png_get_channels' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o: ref.c:(.text+0x52f): undefined reference to ` _png_destroy_read_struct' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o:ref.c:(.text+0x570): undefined reference to ` _png_destroy_read_struct' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o: ref.c:(.text+0x5da): undefined reference to ` _png_read_image' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o:ref.c:(.text+0x601): undefined reference to ` _png_read_end' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o: ref.c:(.text+0x66c): undefined reference to ` _png_destroy_read_struct' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o:ref.c:(.text+0x6d5): undefined reference to ` _display_depth' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o: ref.c:(.text+0x6fa): undefined reference to ` _display_depth' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o:ref.c:(.text+0x709): undefined reference to ` _display_depth' /cygdrive/c/DOCUME~1/xiaodwan/LOCALS~1/Temp/ccsDlvm3.o: ref.c:(.text+0x769): undefined reference to ` _display_graphics' /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libcygwin.a(libcmain.o):libcmain.c:(.text+0xab): undefine d reference to `_WinMain AT 16' collect2: ld returned 1 exit status I also tried many many other flags in gcc, like -lm,. -lpng, -static, I always got these errors. The same problems exist when I compile my own codes when I using pixbuf library. I want to cry. any one can help me? Thanks so much!!! Xiaodong -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |