Click to See Complete Forum and Search --> : Compiler issue


rag84dec
June 27th, 2007, 01:03 AM
hi,
I want to know why c++ has soo many compilers and how do they differ?..... Visual Studio 2005 compiler itself has many versions and why is so?..what kind of features will be added?...

thanks

Ejaz
June 27th, 2007, 02:28 AM
[ Redirected Thread ]

SuperKoko
June 27th, 2007, 04:28 AM
I want to know why c++ has soo many compilers and how do they differ?.....


C++ is an open language.
Everybody can write his own compiler.
There's a commercial competition between compiler vendors too, so that, even on a single platform there are several compilers of different vendors.

They all have advantages and drawbacks.
For example, C++ Builder compiles quickly, but doesn't produce very fast programs (though sometimes it can beat GCC for simple code).
But the main competition of compilers is not for compile times and code generation.
It's for libraries and integration in the system and the IDE too (on Windows systems).

Visual C++ has a good IDE with auto-completion features, and wizards.
Visual C++ offers MFC (which are quite popular) and ATL.
Using COM in other C++ implementations is very painful, especially when events or GUI elements are involved.
Visual C++ has much more but since I don't use it, I don't know it well.

Everything is done to make the languages of Visual Studio interact as well as possible.

Borland C++ has OWL, its own Class Libraries (a bit obsoletized by STL), a good resource editor with a GUI for icons and dialog box creation.
Borland C++ has ObjectComponents for OLE and Visual Database tools for databases.
Borland C++ 5.0 and lower, did support 16 bits Windows applications and MS-DOS applications and provided a library has uniform as possible for these systems.
C++ Builder has much more libraries for networking and many other things, but I don't use it so I'm not sure how much it contains.

MinGW doesn't contain many library extensions to the C++ standard, but provides a very good standard conformance.

Since there's a competition between compiler vendors, things are less beautiful than they could be.

Compiler vendors don't bother much with providing an incompatible ABI with other compiler vendors, and tend to provide libraries whose usefulness of integration in the compiler is dubious (they would be better has third parties libraries that don't depend on the particular compiler) so that their users cannot easily use the compiler of competitors, even if other compilers provide equivalent libraries.
In many points OWL and MFC are similar, but they're very much incompatible. They could rely on a common compatible kernel of classes, but they don't.

Note that on non-Windows systems, there is usually a single ABI. Windows is an exception.
They provide non-standard extensions, many of them being for backward compatibility with their pre-1998 versions. Users may rely on them by convenience or by ignorance (they ignore warnings or don't put the compiler in conforming mode) and so have difficulty switching to another compiler.
Note that backward compatibility with an existing code base is one of the major reason to prefer one compiler over another.


Compiler vendors sell more than one software: Programming languages, desktop applications, databases...
They want a perfect interaction of their programming languages (including C++) with each other and with their other applications.


Visual Studio 2005 compiler itself has many versions and why is so?..what kind of features will be added?...

First, there has been a very important event in 1998: The C++ standard is released.
Visual C++ 6 has a very low conformance level with the C++ standard.
Visual C++ 7 has an acceptable level of conformance, though they're still many bugs.
Visual C++ 8 has a good level of conformance.

Now, Visual C++ tends to drop the backward compatibility quirks it used to have.

Recently, there have been the big 64 bits transition.
Now, Visual Studio has to support 64 bits code.

C++ is not the only language supported by Visual Studio.
Development efforts are put on C++/CLI which is a very young language.
The .NET framework is still young and evolves (the latest version is 3.0 AFAIK).

Visual Studio IDE is improved at every version.

To get the list of all the new things in Visual Studio, read MSDN.
For example, look at "What's new in Visual C++":
http://msdn2.microsoft.com/en-us/library/bw65k95a(VS.80).aspx

ovidiucucu
June 27th, 2007, 11:19 AM
Just additional.
Generally, to find out something like "..what kind of features will be added?..." you can take look in the (on-line) documentation.

As for example What's New in Visual C++ (http://msdn2.microsoft.com/en-us/library/bw65k95a(VS.80).aspx).

ovidiucucu
June 27th, 2007, 11:45 AM
And just to clarify a little.

I want to know why c++ has soo many compilers and how do they differ?..... Visual Studio 2005 compiler itself has many versions and why is so?..what kind of features will be added?...

Visual Studio 2005 has only one version but several editions.
Here is a brief comparison (http://msdn2.microsoft.com/en-us/vstudio/aa700921.aspx).