C compiler for Windows?

Discussion in 'C Programming' started by Johs32, Apr 9, 2006.

  1. Johs32

    Johs32 Guest

    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
     
    Johs32, Apr 9, 2006
    #1
    1. Advertising

  2. Johs32

    Michael Mair Guest

    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.
     
    Michael Mair, Apr 9, 2006
    #2
    1. Advertising

  3. Johs32

    Johs32 Guest

    "Michael Mair" <> skrev i en meddelelse
    news:...
    > 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?
     
    Johs32, Apr 9, 2006
    #3
  4. Johs32

    Flash Gordon Guest

    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
     
    Flash Gordon, Apr 9, 2006
    #4
  5. Johs32

    Sisyphus Guest

    "Johs32" <> wrote in message
    news:e1am0s$s1l$-c.dk...
    >
    > "Michael Mair" <> skrev i en meddelelse
    > news:...
    > > 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
     
    Sisyphus, Apr 9, 2006
    #5
  6. Johs32

    W Marsh Guest

    On Sun, 9 Apr 2006 12:01:01 +0200, "Johs32" <> wrote:

    >
    >"Michael Mair" <> skrev i en meddelelse
    >news:...
    >> 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?
    >


    -++
     
    W Marsh, Apr 9, 2006
    #6
  7. Johs32

    David Wade Guest

    "Johs32" <> wrote in message
    news:e1ahao$rci$-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
    >
    >
     
    David Wade, Apr 9, 2006
    #7
  8. On 2006-04-09, 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++?
    >
    > 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
     
    Richard G. Riley, Apr 9, 2006
    #8
  9. On Sun, 9 Apr 2006 10:40:57 +0200, "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++?
    >
    >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
     
    Barry Schwarz, Apr 9, 2006
    #9
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Yan
    Replies:
    0
    Views:
    1,139
  2. Jack Wright
    Replies:
    5
    Views:
    628
    Shiv Kumar
    Jan 19, 2004
  3. Ram
    Replies:
    0
    Views:
    2,847
  4. Andrey Batyuck

    Compiler compiler with C++ as output

    Andrey Batyuck, May 11, 2004, in forum: C++
    Replies:
    3
    Views:
    442
    Frederik Hertzum
    May 17, 2004
  5. Wormald
    Replies:
    1
    Views:
    1,156
    Victor Bazarov
    Feb 6, 2006
Loading...

Share This Page