Archived

This topic is now archived and is closed to further replies.

compilers

This topic is 5040 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

Compilers are differnt, syntax tends to remain the same from compiler to compiler. However sometimes some compilers are a bit differn''t im not to sure about the book your talking about though so maybe someone else may know more info.

Share this post


Link to post
Share on other sites
For the programs from Deitel & Deitel, any old C++ compiler will work just fine.


"Sneftel is correct, if rather vulgar." --Flarelocke

Share this post


Link to post
Share on other sites
"That damn bug book," is what my friends call it.

With C++ compilers are judged on how closely they follow the C++ standard, a gargantuan document outlining the language.

If anything, get yourself a recent compiler and avoid Visual C++ 6.0 like the plague.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
erm, I hope you didn''t mean MS Visual Basic... that isn''t C++!

Basically:
GCC (GNU Compiler Collection) - this is free and fairly standards complient - you can get a windows version of this called MinGW, I''d suggest downloading DevC++ which has mingw included with it

Microsoft Visual C++ (part of MS Visual Studio) - as antareus said version 6 is worth missing, the latest version .NET are pretty good on standards complience - also MSVS is used frequently by professional windows developers (in its various versions)

Borland C++ (version 5 I think) - Borland have released this for free - I don''t know too much about it.

Other options, if you''re only interested in C programming I''d suggest lcc (google LCC-WIN32 for windows).

Share this post


Link to post
Share on other sites
yes i did mean microsoft visual c++ .net 2003. how hard would it be to change form writing in syntax for the gcc compiler for a while and then switching to visual c++.net 2003?

Share this post


Link to post
Share on other sites
Almost all C++ programs that compile on MSVC++ will compile on GCC without any changes. A textbook should not contain any compiler-specific code; I would think it likely that every example will compile on MSVC++ and GCC.

Share this post


Link to post
Share on other sites
All of the CURRENT C++ compilers are very compliant to the standard on every aspect which a learning programmer is likely to write ... there are abolutely no differences in their treatement of basic types, classes, functions, code orgranization, namespaces, etc ...

As you get into advanced C++ coding, very advanced, then each compiler''s quirks begin to show up .. but only rarely even so, and usually in a way that is easy to identify and work around. The complete C++ lanaguge standard is a fairly complicated thing, and in fact there are even a few areas of it whose interpretation are still being discussed ... so when you download libraries like boost (www.boost.org) which is a very advanced library meant to give programmers very many helpfull tools to use, there are some noticable differences ... but don''t worry about them for now, as long as you have ANY recent compiler ...

I personally know of GCC 3.1 or later, Microsoft Visual C++ 7.1 or later (Visual C++ 2003), Borland C++ 5.5 or later (the free compiler, and Borland C++ Builder 6, and Borland C++ Builder X).

I personally don''t now 100% the relationship between Dev-C++, Bloodshed C++, MinGW, and GCC ... but anyone who does now what they are exactly and how good their standard compliance is, should please post it here.

I have not used it at all, but I too have heard Comeau is supposed to be a good standard compliant compiler. In fact supposedly that is the primary goal of the creators (to be the most compliant compiler).

I used to use Visual C++ 6.0 for over 2 years, back when DirectX 6 was the big thing, and I can tell you personally, it SUCKED completely for any sort of template writing or new standard library stuff. Back them I used to compile programs with Visual C++ until they broke, then I''d run Borland C++ Builder 5 to get usefull "correct" error messages, fix the compliance issue, or sometimes even have to break my code to get VC6 to compile it. Now I use Visual Studio 2003 at work, and am very happy with it for writing good general C++ as well as windows programs of course - but I''m still a Borland fan myself, and highly recommend you check out the free version of Borland C++ Builder X.

Share this post


Link to post
Share on other sites
quote:
Original post by Xai
... - but I''m still a Borland fan myself, and highly recommend you check out the free version of Borland C++ Builder X.


I checked out Borland''s Builder X briefly before but my impression was that it was an IDE for C# programming. It needed me to install the .NET framework for it to work and it compiles the programs using the c# compiler in the .NET framework.

But from the way you described it is it possible to set Builder X up to compile C++ programs?





--{You fight like a dairy farmer!}

Share this post


Link to post
Share on other sites
quote:
Original post by bob123452
yes i did mean microsoft visual c++ .net 2003. how hard would it be to change form writing in syntax for the gcc compiler for a while and then switching to visual c++.net 2003?

You''re missing the point. The C++ language standard defines the syntax; if it doesn''t follow the same syntax, it''s not C++. Syntactically, I doubt any C++ compilers out there have any significant differences (excepting a few extensions, such as a couple of GCC-specific operators whose form eludes me as I have never used them). In general terms, everything that''s standard C++ code (and everything in basic tutorial books should be) should compile the same on all the compilers mentioned in this thread (excepting outdated versions, like Visual C++ 6.0).

The difference you really need to worry about at this stage is standards compliance - some compilers don''t adhere to the standard very well. As long as you stick with current versions, though, both Visual C++ (.NET 2003) and GCC/g++ are fairly good. Later on, there is also the fact that different compilers ship with different libraries and extensions and may work with different third-party libraries and SDK''s (for example, you''ll have a much easier time writing DirectX code with VC++). As a beginner, however, this won''t really concern you.

Share this post


Link to post
Share on other sites
Greatwolf - you must have grabbed the wrong thing ...

borland makes MANY builder products:
Borland C++ Builder
Borland J Builder
Borland C# Builder
Delphi (which is basically Borland Object Pascal Builder

go to borland's website and look at the popup of "downloads"
second one down is C++ Builder
third one down is C++ Builder X
fourth one down is C# Builder




[edited by - Xai on February 23, 2004 6:37:15 PM]

Share this post


Link to post
Share on other sites
quote:
Original post by Xai
I personally don''t now 100% the relationship between Dev-C++, Bloodshed C++, MinGW, and GCC ... but anyone who does now what they are exactly and how good their standard compliance is, should please post it here.

Dev C++ is an IDE that uses MinGW32. "Bloodshed C++" is Dev C++. MinGW32 is a set of headers, import libraries, and utilities for GCC to allow it to create Win32 executables and libraries. When most people say "MinGW32" they imply GCC as well, since it''s all that it''s meant to be used with (unlike many people seem to think, MinGW32 is not its own compiler; the project, however, does repackage GCC, possibly with patches to make it easier to build to use MinGW32). GCC is the GNU Compiler Collection, which includes C and C++ compilers (among other things).

Share this post


Link to post
Share on other sites
thanks null ... i have much experience with GCC on BeOS / FreeBSD and Linux .. but NONE with Windows (where I use Visual Studio and Borland C++ Builder) ...

that information is EXACTLY what I was looking for, thanks again.

Share this post


Link to post
Share on other sites