Linux-like GCC compiler for WIndows?

A

adam.kleinbaum

Hi there,

I'm a grad student working on my university's Linux system, connecting
via the network and using the GCC compiler. My C programs take
advantage of Linux's < and > operators to read stdin from a file and
write stdout to a file, as well as to read from a 2nd file that the
program takes as an argument. So a typical program gets executed like
this: "./prog infile <stdinfile >stdoutfile". (BTW, I'm not sure this
is considered good programming practice, but I do it anyway, so please
don't yell at me over this one...)

I'm looking for a way to run these programs when I'm offline. Does
anyone know a Windows (XP) version of the GCC compiler that allows me
to specify a file for stdin and hopefully also for stdout? Thanks so
much,

Adam
 
B

bwray314

Hi there,

I'm a grad student working on my university's Linux system, connecting
via the network and using the GCC compiler. My C programs take
advantage of Linux's < and > operators to read stdin from a file and
write stdout to a file, as well as to read from a 2nd file that the
program takes as an argument. So a typical program gets executed like
this: "./prog infile <stdinfile >stdoutfile". (BTW, I'm not sure this
is considered good programming practice, but I do it anyway, so please
don't yell at me over this one...)

I'm looking for a way to run these programs when I'm offline. Does
anyone know a Windows (XP) version of the GCC compiler that allows me
to specify a file for stdin and hopefully also for stdout? Thanks so
much,

Adam

<OT>
You're looking for Cygwin.

http://www.cygwin.com/

It's essentially a Unix-like environment for Windows users. You can
get your shell of choice and the GNU set of tools (gcc, gdb, etc).
Takes up a few hundred megabytes of disk space, but quite handy for
Windows people who desire some sort of Unix-like environment.
</OT>
 
U

user923005

Hi there,

I'm a grad student working on my university's Linux system, connecting
via the network and using the GCC compiler. My C programs take
advantage of Linux's < and > operators to read stdin from a file and
write stdout to a file, as well as to read from a 2nd file that the
program takes as an argument. So a typical program gets executed like
this: "./prog infile <stdinfile >stdoutfile". (BTW, I'm not sure this
is considered good programming practice, but I do it anyway, so please
don't yell at me over this one...)

I'm looking for a way to run these programs when I'm offline. Does
anyone know a Windows (XP) version of the GCC compiler that allows me
to specify a file for stdin and hopefully also for stdout? Thanks so
much,

Your question is not a C question. Questions about tools are off-
topic.

BTW:
http://sourceforge.net/project/showfiles.php?group_id=2435
Tragically, Mingw's distribution has a stone-age gcc/g++, so I use
this one:
http://www.thisiscool.com/gcc_mingw.htm
 
M

Mark McIntyre

I'm looking for a way to run these programs when I'm offline. Does
anyone know a Windows (XP) version of the GCC compiler

whats wrong with gcc for windows? STFW....
that allows me
to specify a file for stdin and hopefully also for stdout?

You can do that with any command-line application. You can build those
just as easily with VisualC or BorlandC as with gcc.
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
 
C

CBFalconer

I'm a grad student working on my university's Linux system, connecting
via the network and using the GCC compiler. My C programs take
advantage of Linux's < and > operators to read stdin from a file and
write stdout to a file, as well as to read from a 2nd file that the
program takes as an argument. So a typical program gets executed like
this: "./prog infile <stdinfile >stdoutfile". (BTW, I'm not sure this
is considered good programming practice, but I do it anyway, so please
don't yell at me over this one...)

I'm looking for a way to run these programs when I'm offline. Does
anyone know a Windows (XP) version of the GCC compiler that allows me
to specify a file for stdin and hopefully also for stdout? Thanks so
much,

Why do you need anything? Just run the programs from a command
line prompt window. Gcc is available everywhere, one Windoze
incidence is via DJGPP.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,042
Latest member
icassiem

Latest Threads

Top