Sign in to follow this  

C Compiler

This topic is 4199 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

For what platform? Do you want a free compiler, or do you not mind paying for it? Do you need an IDE or is a command line compiler fine?

Share this post


Link to post
Share on other sites
I can name you 3, each worthy of your inspection and each with its own merits:

MinGW (GCC for Windows)
--- IDE : Code::Blocks, DevC++

Microsoft Compiler (version 7.1)
--- IDE : Code::Blocks, Visual C++ 2003

Microsoft Compiler (version 8)
--- IDE: Visual C++ 2005 Express

I'm pretty sure they will all compile C code, but I'm not sure.

Share this post


Link to post
Share on other sites
Quote:
Original post by agi_shi
Even though I might be wrong, I don't think the Visual C++ compiler compiles C (and please don't think you can write all C in C++...).


MSVC has a C compilation mode, though it only really supports C89.

Share this post


Link to post
Share on other sites
Doesn't djgpp produces DOS mode executablees? Then why to use it, when you have mingw (which is the same compiler - gcc, only you get windows target executalbes).

Share this post


Link to post
Share on other sites
Quote:
Original post by annoyer101
Windows, free, don't need an IDE


mingw-gcc ( http://mingw.org/ )

--------

somewhere in your project settings of VS-project you can set that everything is compiled as "c"-code ... and it does raise appropriate errors on wrong code ^_^
€: sikrane said it :(

Share this post


Link to post
Share on other sites
Quote:
Original post by agi_shi
Even though I might be wrong, I don't think the Visual C++ compiler compiles C (and please don't think you can write all C in C++...).


All the VC++ compilers I know of (from VC++1.52 to the last version) compiles C programs. That's a good thing because there is still a lot of Windows programs that are written in pure C :)

In the Project Properties -> C++ -> Advanced -> Compile As, select Compile as C code (/TC).

Regards,

Share this post


Link to post
Share on other sites
Quote:
Original post by Emmanuel Deloget
Quote:
Original post by agi_shi
Even though I might be wrong, I don't think the Visual C++ compiler compiles C (and please don't think you can write all C in C++...).


All the VC++ compilers I know of (from VC++1.52 to the last version) compiles C programs. That's a good thing because there is still a lot of Windows programs that are written in pure C :)

In the Project Properties -> C++ -> Advanced -> Compile As, select Compile as C code (/TC).

Regards,

I think he's referring to C99. C++ is essentially a superset of C89, isn't it? If that's true, I would hope that all C++ compilers are C(89) compilers.

Share this post


Link to post
Share on other sites
Not really. C++98 and C89 have many subtle differences involving linkage, implicit conversions, const semantics, scope rules and type rules in addition to obvious things like the new keywords. One of C++'s motto is/was "As close to C as possible, but no closer." While these differences seem minor when you consider small toy programs, trying to run an application of significant complexity written in C89 through a C++98 compiler will rarely compile. Or link if it does compile; or run correctly even if it does link.

Share this post


Link to post
Share on other sites
Quote:
Original post by SiCrane
Not really. C++98 and C89 have many subtle differences involving linkage, implicit conversions, const semantics, scope rules and type rules in addition to obvious things like the new keywords. One of C++'s motto is/was "As close to C as possible, but no closer." While these differences seem minor when you consider small toy programs, trying to run an application of significant complexity written in C89 through a C++98 compiler will rarely compile. Or link if it does compile; or run correctly even if it does link.

I see. Nevermind, then.

Share this post


Link to post
Share on other sites

This topic is 4199 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.
Sign in to follow this