Why I cannot build my own program in Cygwin when using libpng function????
Charles Wilson
cygwin@cwilson.fastmail.fm
Tue Oct 2 15:43:00 GMT 2007
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@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/
More information about the Cygwin
mailing list