* Cross-compiling for Windows under Linux
@ 2006-02-18 9:45 Shriramana Sharma
2006-02-18 10:33 ` Glynn Clements
2006-02-19 10:26 ` Tomas Janousek
0 siblings, 2 replies; 5+ messages in thread
From: Shriramana Sharma @ 2006-02-18 9:45 UTC (permalink / raw)
To: Linux C Programming List
I am running SUSE Linux 10.0 and I would like to compile my programs for
32-bit Windows without booting to Windows.
If I boot to Windows, I can use gcc and make that come with Cygwin or MinGW,
but I would like to avoid the hassle of booting to Windows at all.
Is there a way I can do this?
Thanks in advance.
--
Tux #395953 resides at http://samvit.org
playing with KDE 3.51 on SUSE Linux 10.0
$ date [] CCE +2006-02-18 W07-6 UTC+0530
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Cross-compiling for Windows under Linux
2006-02-18 9:45 Cross-compiling for Windows under Linux Shriramana Sharma
@ 2006-02-18 10:33 ` Glynn Clements
2006-02-18 15:50 ` Shriramana Sharma
2006-02-19 10:26 ` Tomas Janousek
1 sibling, 1 reply; 5+ messages in thread
From: Glynn Clements @ 2006-02-18 10:33 UTC (permalink / raw)
To: Shriramana Sharma; +Cc: Linux C Programming List
Shriramana Sharma wrote:
> I am running SUSE Linux 10.0 and I would like to compile my programs for
> 32-bit Windows without booting to Windows.
>
> If I boot to Windows, I can use gcc and make that come with Cygwin or MinGW,
> but I would like to avoid the hassle of booting to Windows at all.
>
> Is there a way I can do this?
Yes; for details, see:
http://vmlinux.org/crash/mirror/www.objsw.com/CrossGCC/
--
Glynn Clements <glynn@gclements.plus.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Cross-compiling for Windows under Linux
2006-02-18 10:33 ` Glynn Clements
@ 2006-02-18 15:50 ` Shriramana Sharma
2006-02-18 18:48 ` Glynn Clements
0 siblings, 1 reply; 5+ messages in thread
From: Shriramana Sharma @ 2006-02-18 15:50 UTC (permalink / raw)
To: Linux C Programming List
Saturday, 18 February 2006 16:03 samaye tvayaa likhitam:
> http://vmlinux.org/crash/mirror/www.objsw.com/CrossGCC/
It's far above my head. Can anyone please explain what they are doing? Are
they suggesting GCC can be used as I have it in my system (4.02 BTW) to
create Windows binaries? There is some mention of a patch. Am I to build gcc
myself from sources after applying the patch?
Thanks.
--
Tux #395953 resides at http://samvit.org
playing with KDE 3.51 on SUSE Linux 10.0
$ date [] CCE +2006-02-18 W07-6 UTC+0530
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Cross-compiling for Windows under Linux
2006-02-18 15:50 ` Shriramana Sharma
@ 2006-02-18 18:48 ` Glynn Clements
0 siblings, 0 replies; 5+ messages in thread
From: Glynn Clements @ 2006-02-18 18:48 UTC (permalink / raw)
To: Shriramana Sharma; +Cc: Linux C Programming List
Shriramana Sharma wrote:
> > http://vmlinux.org/crash/mirror/www.objsw.com/CrossGCC/
>
> It's far above my head. Can anyone please explain what they are doing?
The FAQ explains how to compile versions of binutils and gcc which run
on Linux but which generate binaries for other platforms (e.g.
Windows).
The GNU tools (gcc, as (the assembler), ld (the linker) etc) can
generate code for a wide variety of platforms, including Linux and
Windows. They are written in C, and can be compiled to run on a wide
variety of platforms. The platform on which the compiler/linker/etc
runs doesn't have anything to do with the platform for which it
generates binaries.
When you run the binutils/gcc/etc configure script, you use the
--target option to tell it which platform you want it to generate code
for (if you don't use this switch, it assumes that you want it to
generate code for the platform on which the compiler runs).
E.g. if you want a compiler which generates Windows binaries, you
would use --target=i686-pc-mingw32 (this worked the last time I built
cross-gcc; check the installation instructions supplied with gcc for
an up-to-date list of target names).
> Are they suggesting GCC can be used as I have it in my system (4.02
> BTW) to create Windows binaries?
The normal gcc and binutils packages from your OS vendor won't be able
to generate Windows binaries. You need versions which were built to
generate Windows (rather than Linux) binaries.
You might be able to get pre-compiled cross-gcc/binutils binaries for
your system, otherwise you will need to build them from source.
> There is some mention of a patch. Am I to build gcc myself from
> sources after applying the patch?
You shouldn't need any patches. The one mentioned in section 3 of the
FAQ is specific to MS-DOS. You don't need it to generate Windows
binaries.
--
Glynn Clements <glynn@gclements.plus.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Cross-compiling for Windows under Linux
2006-02-18 9:45 Cross-compiling for Windows under Linux Shriramana Sharma
2006-02-18 10:33 ` Glynn Clements
@ 2006-02-19 10:26 ` Tomas Janousek
1 sibling, 0 replies; 5+ messages in thread
From: Tomas Janousek @ 2006-02-19 10:26 UTC (permalink / raw)
To: linux-c-programming
Hello,
Shriramana Sharma napsal(a):
> I am running SUSE Linux 10.0 and I would like to compile my programs for
> 32-bit Windows without booting to Windows.
>
> If I boot to Windows, I can use gcc and make that come with Cygwin or MinGW,
> but I would like to avoid the hassle of booting to Windows at all.
>
> Is there a way I can do this?
Look at these:
http://www.mingw.org/MinGWiki/index.php/build%20a%20Win32%20x-compiler%20for%20Linux
http://www.mingw.org/MinGWiki/index.php/BuildMingwCross
--
.--------- Tomáš Janoušek a.k.a. Liskni_si ---------.
: NOMI team, developer, http://tomi.nomi.cz/ tomi@nomi.cz :
' JID:liskni_si@jabber.cz, ICQ#161807083, tel:+420608876277 '
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-02-19 10:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-18 9:45 Cross-compiling for Windows under Linux Shriramana Sharma
2006-02-18 10:33 ` Glynn Clements
2006-02-18 15:50 ` Shriramana Sharma
2006-02-18 18:48 ` Glynn Clements
2006-02-19 10:26 ` Tomas Janousek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).