C compiler for Windows?

J

Johs32

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
 
M

Michael Mair

Johs32 said:
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++
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
 
J

Johs32

Michael Mair said:
<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?
 
F

Flash Gordon

Johs32 said:
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.
 
S

Sisyphus

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.
Where should I post this question instead?

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

Cheers,
Rob
 
D

David Wade

Johs32 said:
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.
 
R

Richard G. Riley

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!
 
B

Barry Schwarz

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
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top