How come there are so many different compiles for C++? Also, it seems like you need to code differently for different compilers. One time I wrote a code that worked on one compiler and not on another. Why is that? Wouldn't that cause a lot of problems when sharing programs?
Compiler Differences
Started by DevilsCharm, Nov 07 2007 05:38 PM
3 replies to this topic
#1
Posted 07 November 2007 - 05:38 PM
|
|
|
#2
Posted 07 November 2007 - 09:36 PM
Different compilers use different ways to interpret and compile the sourcecode. It's like browser and their way to show the HTML visually for the user.
Normally, when you make bigger projects, or similar, you make a makefile for as many compilers as possible. Then the user can choose which of the makefiles to use, depending on the user's compiler.
Normally, when you make bigger projects, or similar, you make a makefile for as many compilers as possible. Then the user can choose which of the makefiles to use, depending on the user's compiler.
#3
Posted 08 November 2007 - 09:37 AM
In addition, C++ is not a fixed or simple object. C++ started as a private project in Bell Labs, then it became an ISO/ANSI standard. It has been through a few revisions since then. AFTER a standard is set, it is up to the various compiler creators to adjust the compiler to implement the various elements of the standard are implemented.
One thing that I ran into was when something that was legal C++ became illegal. I had an older compiler that would run the (newly) illegal code, and a newer one that wouldn't. When the standard changes, you have to be careful about updating the compiler, as it could break TONS of old code that used to be legal.
One thing that I ran into was when something that was legal C++ became illegal. I had an older compiler that would run the (newly) illegal code, and a newer one that wouldn't. When the standard changes, you have to be careful about updating the compiler, as it could break TONS of old code that used to be legal.
#4
Posted 10 November 2007 - 04:11 PM
C++ is huge. There was an article on Reddit today about how the C++ template language is Turing equivalent by accident*. There aren't any compilers that are fully compliant to the standard AFAIK but I might be wrong.
There aren't any fully compatible C99 compilers yet and C99 is a far less complex beast than C++.
*this simply means it can solve any finite algorithm that can be defined and thus is able to solve the problem set of any other language in existence.
There aren't any fully compatible C99 compilers yet and C99 is a far less complex beast than C++.
*this simply means it can solve any finite algorithm that can be defined and thus is able to solve the problem set of any other language in existence.


Sign In
Create Account


Back to top









