X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: <47026685.5070101@cwilson.fastmail.fm> Date: Tue, 02 Oct 2007 11:40:53 -0400 From: Charles Wilson User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Why I cannot build my own program in Cygwin when using libpng function???? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com valpassing wrote: > 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 try gcc -I/usr/include/libpng12 -o ref ref.c -lpng12 -lz gcc searches from left to right. If ref.c uses symbols provided by libpng, then libpng must appear *after* ref.c on the command line. -- Chuck -- 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/