Re: mingw32



On Mon, 2003-08-25 at 05:59, TORRI Vincent wrote:
On Mon, 25 Aug 2003, Eduardo Lütz wrote:

Hi, everybody.

I'm new to this list. I a GNU/Linux user/developer.

Straight to the point: where can I find detailed information on
how to compile a C GTK+ program to work in Windows (crosscompilation
from Linux or anything else)?

I've been developing Linux C GTK+ applications for some time and
everything goes fine.

Now there are people who want me to port some of my programs to
Windows. I experimented to crosscompile with mingw32 very small
utilities without GUI (no GTK). Works fine, they behave in Windows
as the behave in Linux, without rewriting any code.

But when I tried to compile programs that use gtk, it didn't work.
I've read Tor's hints (from his page) and nothing.
I've tried to compile with gcc directly within Windows
(of course, I installed GTK previously). No way.

add in your Makefile the following flags for the compilation (last build 
of msys/mingw): 
 -mno-cygwin -march=pentium  -mms-bitfields -mwindows

if you do not want the "msdos" window, replace -mwindows by -mnowindows


I guess I don't know how to work without gtk-config.

perhaps you should use gtk 2.2 instead of gtk 1.3, if it does not require 
too much work ?

Definitely use gtk 2.2.2.  I use the packages at
http://sourceforge.net/projects/gtk-win

I have a complete mingw32 cross environment on linux that can produce 
win32 exe's compatible with the runtime provided by the link I
mentioned.  If you want a tarball of it, I'll be happy to post it
somewhere.  It's kind of large (about 33 mb).

I've also found that it's pretty easy to hack the Makefile.in and
Configure.in files that glade-2 produces to allow you to take your
glade-produced source code and target win32 and linux simultaneously. 
Please let me know if you want info on that too.

Compiling all the libs from scratch is doable but there are problems
I've run into, so I just use the precompiled (on visual studio) dlls
that the gtk-win site provides.

Michael


regards

Vincent TORRI


Any suggestions?

Thanx a lot.
Ed Lutz

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

-- 
Michael L Torrie <torriem chem byu edu>



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