• 0

GCC questions


Question

From what I understand the GCC is a collection of compilers for various programming languages like c++ am I correct?

Does the GCC change the specifications for programming languages? If so, who does? I've noticed that Dev-C++ currently uses a port from GCC 3.3.1 but the latest is 3.4.2.. When I program c++ will there be any differences between using those versions?

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

No, GCC tries to adhere to the specifications for a language if one exists. Versions may add optimizations or bug fixes, but they don't really change the languages, except to get closer to the specs. If you look at the changelog you'll see this is the case. But using the latest version is always advised, assuming it's a stable version, which 3.4.2 is.

Link to comment
Share on other sites

  • 0

Ok thanks.. So is there a good c++ compiler that uses the latest version of gcc?

On a side note, one of the requirements of Dev-C++ is:

The executables compiled by Dev-C++ will need MSVCRT.DLL (comes with Windows 95 OSR 2 or higher).

But I thought C++ was platform independent? Or is it the way the executables are compiled so if I re-compiled in another OS it would be ok?

Link to comment
Share on other sites

  • 0
Ok thanks.. So is there a good c++ compiler that uses the latest version of gcc?

On a side note, one of the requirements of Dev-C++ is:

But I thought C++ was platform independent? Or is it the way the executables are compiled so if I re-compiled in another OS it would be ok?

Yes, C++ is platform independent, that is unless you use some code that there is no implementation of on another platform. But I don't think that DLL file will make it platform dependent, it's the code you use that will make it platform dependent. Just make sure the code you use (i.e. any GUI stuff or any other external functions you use) is available for all the target platforms.

You might check out Borland C++Builder, although I'm not sure what GCC version it uses. The version you have now is perfectly fine though.

Link to comment
Share on other sites

  • 0
But I thought C++ was platform independent? Or is it the way the executables are compiled so if I re-compiled in another OS it would be ok?

You hit the nail on the head. If you stick to standard C++, your sourcecode will be platform independent. Or rather, you'll be able to compile it on platforms that standard compliant C++ compilers exist for.

The resulting executable, however, is not necessarily platform independent. Hence the dependence on MSVCRT.DLL is nothing to be worried about per se.

Note that your sourcecode can always be bound to a specific platform by using extensions to the standard that other platforms don't provide. Platform API calls are a prime exampe. Such calls are often times necessary when you want to do things the C++ standard doesn't (currently) cover - like GUI or network programming. There are often times platform independent libraries for such jobs that completely encapsulate the "native" calls - but those usually come with their own learning curve, license issues, et cetera.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.