470,833 Members | 1,387 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,833 developers. It's quick & easy.

C compiler for Windows?

I would like to write some C code in winXP. I was told that I could use
visual c++ but does that not only work for C++?

What compiler is the best for C and C++ in windows?

Johs
Apr 9 '06 #1
8 2219
Johs32 schrieb:
I would like to write some C code in winXP. I was told that I could use
visual c++ but does that not only work for C++?
<OT>Visual C++ also provides a C mode; it is possible to make
sure that it never erroneously tries to compile C code as C++
code</OT>

What compiler is the best for C and C++ in windows?


We do not discuss C++ here.

For C:
Depends. What do you mean by "best"?
- Conforming to standard C? Provides C89 and C99 mode?
- Does not cost much or nothing?
- Compiler source available so you can be sure the compiler
does not do bad things?
- Nifty language extensions (which make the code non-portable)?
Cheers
Michael
--
E-Mail: Mine is an /at/ gmx /dot/ de address.
Apr 9 '06 #2

"Michael Mair" <Mi**********@invalid.invalid> skrev i en meddelelse
news:49************@individual.net...
Johs32 schrieb:
I would like to write some C code in winXP. I was told that I could use
visual c++ but does that not only work for C++?


<OT>Visual C++ also provides a C mode; it is possible to make
sure that it never erroneously tries to compile C code as C++
code</OT>


Where should I post this question instead?
Apr 9 '06 #3

"Johs32" <sd**@dss.com> wrote in message
news:e1**********@news.net.uni-c.dk...

"Michael Mair" <Mi**********@invalid.invalid> skrev i en meddelelse
news:49************@individual.net...
Johs32 schrieb:
I would like to write some C code in winXP. I was told that I could use
visual c++ but does that not only work for C++?

Visual C++ will be fine for C code. Just save the source file as '.c' file
and it will be compiled as a C file. Save the source file as a '.cpp' file
and it will be compiled as a C++ file.

Alternatively use the freely available MinGW (native Win32 port of gcc)
compiler. Its C compiler is called 'gcc' and its C++ compiler is called
'g++' - you can invoke whichever one you want.

<OT>Visual C++ also provides a C mode; it is possible to make
sure that it never erroneously tries to compile C code as C++
code</OT>


Where should I post this question instead?


My suggestion would be comp.os.ms-windows.programmer.misc.

Cheers,
Rob

Apr 9 '06 #4
On Sun, 9 Apr 2006 12:01:01 +0200, "Johs32" <sd**@dss.com> wrote:

"Michael Mair" <Mi**********@invalid.invalid> skrev i en meddelelse
news:49************@individual.net...
Johs32 schrieb:
I would like to write some C code in winXP. I was told that I could use
visual c++ but does that not only work for C++?


<OT>Visual C++ also provides a C mode; it is possible to make
sure that it never erroneously tries to compile C code as C++
code</OT>


Where should I post this question instead?


-++
Apr 9 '06 #5
Johs32 wrote:
I would like to write some C code in winXP. I was told that I could use
visual c++ but does that not only work for C++?
Almost all C++ compilers can be made to work as C compilers as well.
What compiler is the best for C and C++ in windows?


That is a matter of debate. I suggest you ask in a Windows group, since
we don't deal with specific tool sets here. However, you may find this
reference useful http://clc-wiki.net/wiki/C_Compilers

See the link in my sig for more information about this group.
--
Flash Gordon, living in interesting times.
Web site - http://home.flash-gordon.me.uk/
comp.lang.c posting guidelines and intro:
http://clc-wiki.net/wiki/Intro_to_clc
Apr 9 '06 #6
"Johs32" <sd**@dss.com> wrote in message
news:e1**********@news.net.uni-c.dk...
I would like to write some C code in winXP. I was told that I could use
visual c++ but does that not only work for C++?

What compiler is the best for C and C++ in windows?
Each compiler has its good points and bad points. For example, my thoughts
on a few of the common ones are:-

Salford C++ => Supposedly has features to help a beginner get started.
Expensive for the individual

Microsoft Visual "C" => Good IDE, may be needed for some programs, use may
cause poloitical harm. I have found its include files a little odd.

GNU C => Mingw Port => Free compiler that produces Native C code. Missing
some oft used routines in the library.

GNU C => cygwin => Basically same compiler but use a UNIX compatability
layer. Better UNIX compatability, but changes in comptabaility layer may
make distribution and testcode tricky..

Watcomm "C". => Free compiler with IDE, Native Windows code, good help
system. Bit of a niche compiler so support may not be as good as the others.
Also if you are modifiying existing code than using the same compiler as the
author may help.
Johs

Apr 9 '06 #7
On 2006-04-09, Johs32 <sd**@dss.com> wrote:
I would like to write some C code in winXP. I was told that I could use
visual c++ but does that not only work for C++?

What compiler is the best for C and C++ in windows?

Johs


Although drifting off topic, it might well come down to what you want
to program in C. Here is a good website discussing the various options:

http://www.thefreecountry.com/compilers/cpp.shtml

What is your level of experience? If you're old fashioned then gnu c with
gdb under cygwin is very, very competent : if you want a pretty front
end then I'm not sure if the current crop of gcc/gdb front ends are cygwin
compatible : you'll have to do some research. There are so many
options depending on your targets.

Whichever way, you'll get more help in a windows programming
newsgroup I suspect ...

Good luck!

--
Aspirat primo Fortuna labori.
-- Virgil, and all good teachers
Apr 9 '06 #8
On Sun, 9 Apr 2006 10:40:57 +0200, "Johs32" <sd**@dss.com> wrote:
I would like to write some C code in winXP. I was told that I could use
visual c++ but does that not only work for C++?

What compiler is the best for C and C++ in windows?

Many products, including VC++, contain both a C and a C++ compiler,
either as separate programs or as different modes within a single
program.

This group deals only with the standard C language. Questions about
specific systems, such as WinXP, or specific compilers, such as VC++,
belong in groups where those subjects are topical.
Remove del for email
Apr 9 '06 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Mike Fisher | last post: by
3 posts views Thread by Hamilton | last post: by
1 post views Thread by keithb | last post: by
1 post views Thread by Bruce | last post: by
41 posts views Thread by Miroslaw Makowiecki | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.