This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libpng issues


Marco Alanen wrote:

Yes it's installed, otherwise it wouldn't compile nor run :)

 > Please contact the distributor of your MinGW libpng since this library
 > is not distributed with Cygwin it is not supported here.

Ok. I just thought that since it's included in the cygwin installer, someone here might have an idea (or previous experiences) about this.

"...it's included..." ???


Yes, the cygwin installation includes TWO cygwin versions of libpng (1.0.x and 1.2.x). You can link against those libraries (/usr/lib/libpng*), and include their headers (/usr/include/*) -- but they require and use cygwin as their runtime library.

If you attempt to link against them using gcc- -mno-cygwin, there are two problems:

(1) you get msvcrt.dll as your runtime library, NOT cygwin -- and even if you COULD get it to link, it wouldn't work properly because the libpng library isn't getting the runtime library it expects.

thus, this is not an issue for this list; you want the mingw list -- and maybe check out the GNUWin32 (*) project for mingw versions of various libraries. (*) grumble grumble gnuwin name USED to mean cygwin grumble needless confusion grumble.

(2) Because the folks who created the -mno-cygwin switch KNOW this, they made it so that gcc, when given -mno-cygwin flag, doesn't even LOOK in /usr/lib when linking, nor in /usr/include when when preproceesing/compiling. Because the only thing you'll find, on a cygwin system, in those two directories, are CYGWIN libraries and headers.

gcc -mno-cygwin looks in /usr/lib/mingw and /usr/include/mingw

The libpng packages provided by the cygwin project are do NOT provide mingw versions. If you want mingw versions of those libraries, you'll have to get them from the mingw people (or compile them yourself, or go to GNUWin32 <grumble>) and put them into your *cygwin* installation's /usr/lib/mingw and /usr/include/mingw manually.

(Note that mingw-**MSYS** sets up its own, entirely separate tree, with it's own /usr/include/ and /usr/lib/, which are (obviously) filled with all kinds of mingw-goodies. That's not what I'm talking about here; cygwin can't see THOSE directories. Cygwin != MSYS.).

As far as I know, other than mingw-runtime and w32api, there are only TWO packages in the standard cygwin installation that provide mingw libraries: mingw-zlib and mingw-bzip2/mingw-libbz2. I think you'll find the difference between

cygwin's cygwin-zlib (e.g. "normal for the cygwin system" zlib) package contents
http://cygwin.com/cgi-bin2/package-cat.cgi?file=zlib%2Fzlib-1.2.1-2&grep=zlib


and cygwin's mingw-zlib package contents http://cygwin.com/cgi-bin2/package-cat.cgi?file=mingw-zlib%2Fmingw-zlib-1.2.1-2&grep=mingw-zlib

quite instructive. Obviously, cygwin's libpng packages are "normal for the cygwin system" and are NOT mingw-ish.

--
Chuck
libpng* maintainer
zlib maintainer
mingw-zlib maintainer
bzip2 maintainer
mingw-bzip2 maintainer


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]