This is the mail archive of the 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: Bug: Win32 GTK binaries and Cygwin heap error

Tim Renner wrote:


Setup a cygwin environment via the cygwin installer from, making sure to install libiconv

To set up GTK+ 2.2, get these packages....

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.

Unfortunately, we have a case where we need to use Cygwin to compile our project because we need the unix and posix support, so -mno-cygwin is out... AND we need to link to GTK libraries that do not require an X-server. What gets me though is that this DOES work with the older dll, but not with the newer ones... I'd like to know what changed to cause this difference and if it is a bug or if we just got lucky with the old version ;)

What I'm seeing for dependencies (Using depends.exe on my test program) is that it depends on Cygwin1.dll and kernel32.dll, as well as libgtk-win32-2.0-0.dll, which does depend on msvcrt.dll, but not cygwin1.dll. I'm no expert on dll's, so I don't know if that will cause a problem, but from what I understand, that seems okay?


The new MSN 8: advanced junk mail protection and 2 months FREE*

-- Unsubscribe info: Bug reporting: Documentation: FAQ:

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