Re: GTK+ for Windows

Cheng, Kevin  writes:
 > I was wondering if you know of, or already have any GTK already
 > compiled lib files? 

The GTK+ 2.6.8 developer package for Windows available at contains
import libraries for Microsoft's tools (.lib files). As the .lib files
are import libraries, they don't contain any compiled code as
such. (The actual code is in the corresponding DLLs.) Hopefully you
aren't actually asking for statically built libraries? That's futile.

Even if there wasn't any .lib files provided, it would be trivial to
build such yourself when you have the DLL, and know that the calling
convention is the normal for C code, cdecl. (I.e. no stdcall crap.)
Just use Microsoft's link.exe and lib.exe:

link -dump -exports libgtk-win32-2.0-0.dll >gtk-win32-2.0.def

edit the listing into a proper .def file, it should look like this:


and then run:

lib -name:libgtk-win32-2.0-0.dll -def:gtk-win32-2.0.def -out:gtk-win32-2.0.lib

Isn't this documented in the documentation for the Microsoft tools you
hopefully got when you bought them?

(The fact that the DLLs are built with GNU tools (gcc and binutils) is
irrelevant. C code built with gcc is binary compatible with code built
with Microsoft tools. I built the .lib files using the "freely"
downloadable Visual C++ Express Edition 2005 Beta 2 (or whatever its
exact name is).)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]