Re: Compile GtK and develop in Windows environment...



Ganesh Kumar writes:
I want to develop some GUI in Windows too.. I know that there are VB and 
VC++ available.. but i want to do with GTK only..

VC++ (Visual C++, Visual Studio etc, i.e. the various product versions
and bundles of Microsoft compilers) and GTK don't exclude each
others. You can compile GTK-using programs using the Microsoft
compiler just fine. (Especially if you use the venerable VC6, because
then you don't need to look out for problems because your code uses a
different C runtime library than GTK does. These problems might not
happen in your code, though.)

The Visual Studio debugger is quite nice, that would be one reason to
prefer the Microsoft compiler. Unfortunately it doesn't understand the
debugging format used by gcc.

But maybe when you say VC++ you mean MFC and/or the "native" Microsoft
widgets, "Common Controls". Those indeed can be said to be a
Win32-only alternative to GTK.

Any one could u tell me how to use our Gtk to develop and 
compile,execute... 

Like you would any 3rd-party library.

Tell your compiler where the GTK+ headers (and those headers include
by GTK+ headers, like Pango, atk and GLib) are. Tell your linker where
the GTK+ (import) libraries are, link with the appropriate
libraries. Make sure the DLLs are found in PATH when running the
resulting executable.

How to do the above exactly depends greatly on what compiler and other
tools you use. With Makefiles and gcc, it's very similar to on
Unix/Linux.

The Unixish way to get the above information is through the pkg-config
program, which is also available for Windows.

You can find zip archives containing all you need for developing and
running GTK apps on Windows, including pkg-config, from
ftp.gtk.org. Of course, understanding exactly what you need can be
daunting especially if you are new. There are also easier to use
one-in-all installers at gladewin32.sourceforge.net. But as always,
there is a tradeoff between doing things at a lower level and have
exact control and see exactly what happens, or letting somebody else
hide the details and not really knowing what is going on. It's your
choice.

(I hope you aren't planning on building GTK itself? That should not be
necessary, and is definitely not recommended if you are new to all
this.)

What are the requirement have to build on Windows OS...

The non-GTK-related parts of your code have to be portable.

--tml



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