Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > C compiler for Windows?

Reply
Thread Tools

C compiler for Windows?

 
 
Johs32
Guest
Posts: n/a
 
      04-09-2006
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


 
Reply With Quote
 
 
 
 
Michael Mair
Guest
Posts: n/a
 
      04-09-2006
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.
 
Reply With Quote
 
 
 
 
Johs32
Guest
Posts: n/a
 
      04-09-2006

"Michael Mair" <(E-Mail Removed)> skrev i en meddelelse
news:(E-Mail Removed)...
> 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?


 
Reply With Quote
 
Flash Gordon
Guest
Posts: n/a
 
      04-09-2006
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
 
Reply With Quote
 
Sisyphus
Guest
Posts: n/a
 
      04-09-2006

"Johs32" <(E-Mail Removed)> wrote in message
news:e1am0s$s1l$(E-Mail Removed)-c.dk...
>
> "Michael Mair" <(E-Mail Removed)> skrev i en meddelelse
> news:(E-Mail Removed)...
> > 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



 
Reply With Quote
 
W Marsh
Guest
Posts: n/a
 
      04-09-2006
On Sun, 9 Apr 2006 12:01:01 +0200, "Johs32" <(E-Mail Removed)> wrote:

>
>"Michael Mair" <(E-Mail Removed)> skrev i en meddelelse
>news:(E-Mail Removed)...
>> 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?
>


-++
 
Reply With Quote
 
David Wade
Guest
Posts: n/a
 
      04-09-2006
"Johs32" <(E-Mail Removed)> wrote in message
news:e1ahao$rci$(E-Mail Removed)-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
>
>



 
Reply With Quote
 
Richard G. Riley
Guest
Posts: n/a
 
      04-09-2006
On 2006-04-09, Johs32 <(E-Mail Removed)> 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
 
Reply With Quote
 
Barry Schwarz
Guest
Posts: n/a
 
      04-09-2006
On Sun, 9 Apr 2006 10:40:57 +0200, "Johs32" <(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiler Error Message: The compiler failed with error code -1073741819 Ram ASP .Net 0 09-13-2005 09:52 AM
Why is a JIT compiler faster than a byte-compiler RickMuller Python 4 03-26-2005 04:30 PM
Compiler compiler with C++ as output Andrey Batyuck C++ 3 05-17-2004 08:17 PM
Can we use <compiler> tag to avoid RunTime Compiler error? Jack Wright ASP .Net 5 01-19-2004 04:36 PM
Compiler Error Message: The compiler failed with error code 128. Yan ASP .Net 0 07-21-2003 10:49 PM



Advertisments