Bug: Win32 GTK binaries and Cygwin heap error

Charles Wilson cwilson@ece.gatech.edu
Wed Mar 12 07:12:00 GMT 2003


Tim Renner wrote:

> -- TEST SETUP --
> 
> Setup a cygwin environment via the cygwin installer from
> http://www.cygwin.com/setup.exe, making sure to install libiconv
> 
> To set up GTK+ 2.2, get these packages....
> 
> Support:
> http://prdownloads.sourceforge.net/gettext/libiconv-1.8-w32-1.bin.zip?download 
> 
> http://www.gimp.org/~tml/gimp/win32/libintl-0.10.40-tml-20020904.zip
> http://www.gimp.org/~tml/gimp/win32/gettext-dev-0.10.40-20020904.zip
> http://www.gimp.org/~tml/gimp/win32/pkgconfig-0.14.zip
> 
> GTK Packages:
> http://www.gimp.org/~tml/gimp/win32/glib-2.2.1.zip
> http://www.gimp.org/~tml/gimp/win32/glib-dev-2.2.1.zip
> http://www.gimp.org/~tml/gimp/win32/atk-1.0.3-20020821.zip
> http://www.gimp.org/~tml/gimp/win32/atk-dev-1.0.3-20020821.zip
> http://www.gimp.org/~tml/gimp/win32/pango-1.2.1.zip
> http://www.gimp.org/~tml/gimp/win32/pango-dev-1.2.1.zip
> http://www.gimp.org/~tml/gimp/win32/gtk+-2.2.1.zip
> http://www.gimp.org/~tml/gimp/win32/gtk+-dev-2.2.1.zip
> 

this will not work.  Those gtk libraries are native windows.  They use 
system runtime functions provided by msvcrt.dll (e.g. printf, fopen, etc).

if you compile an application using the cygwin gcc, it will by default 
link against cygwin1.dll, and your application will use the printf, 
fopen, etc functions provided by cygwin1.dll.

If you build a program under cygwin, and link to those nativewindows gtk 
libraries, you will get a program that uses BOTH cygwin1.dll AND 
msvcrt.dll to resolve runtime calls.  Boom.

You need to use 'gcc -mno-cygwin' -- or better yet, follow Tor's 
instructions and use the MSYS/mingw system and not cygwin.

Regardless, your problem is not mixing two different cygwin dlls.  It's 
mixing cygwin1.dll runtime and msvcrt runtime in the same executable.

--Chuck



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list