This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: help regarding GCC.


Suresh A wrote:

> Is GCC is available for windows platform?

There are two major GCC distributions for Windows:

   http://www.cygwin.com/

       - an emulated unix-alike environment; cygwin's GCC produces
         executables which depend upon the emulation layer.

   http://www.mingw.org/

       - a more minimal implementation to create native windows
         executables that do not depend on an emulation layer.
         (Missing some posix functionality though?)

> If i write a source for an app in Windows platform (using functions
> supported in GNU Libraries and not using win32APIs), can i compile the
> same in LINUX / other platforms without any code change?

In theory, yes; you may have to worry about variations in data
type/endianness. Depending on how complex/which apis you use (e.g.
process control/signals), cygwin is may be more suited to thi - although
unless your program is full GPL you may have licensing issues linking
with cygwin's emulation layer.

In practise, it might take a little work: it may be worth your while
investigating GNU autoconf.

(Incidentally, it would have been more appropriate to keep this on the
gcc-help list!)

Rup.


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