about compiler

Pages: 12
Nov 11, 2012 at 3:43pm
can any body tell about a good compiler for windows 7 except vusial studio..??
Nov 11, 2012 at 3:50pm
code::blocks
the webpage is www.codeblocks.org, i use it and its very good
Nov 11, 2012 at 4:00pm
Do you mean compiler or IDE?
Dec 31, 2012 at 7:57pm
for compiler, i use GNU GCC compiler
Dec 31, 2012 at 10:54pm
GCC is awesome
Jan 1, 2013 at 12:44am
I've heard before on here that GCC is the best. Can somebody tell me why it's better than Visual C++?
Jan 1, 2013 at 10:49am
I love using visual studio than code blocks because i can easily view my applications compiled by visual studio outside visual studio but when i compile in code blocks i can't do it,i will have to view it through code blocks but visual studio not necessary......... Visual studio is the best
Jan 1, 2013 at 12:31pm
@tolustar, you can use Code::Blocks to compile programs using Visual Studio compiler too.
Jan 1, 2013 at 9:43pm
Yeah I use Visual Studio because it's what I was trained to use to a degree. The only thing I have left to figure out specific to the compiler itself is how to extract the program I write within it from the compiler so I can run my own program on its own and not within Visual Studio.
Jan 1, 2013 at 9:47pm
I love using visual studio than code blocks because i can easily view my applications compiled by visual studio outside visual studio but when i compile in code blocks i can't do it,i will have to view it through code blocks but visual studio not necessary......... Visual studio is the best

Whatever your problem might be, it's not related to the compilers you're using, it's just that you're doing it wrong.
Jan 2, 2013 at 12:58am
GCC follows c++ standards very well and does not include any non-standard c++ code as much as it can.
in visual studio, c++ is influenced by .net framework e.g. you can add Garbage Collaction to a class via a _gc keyword (I don't remeber the syntax ;) ) in class definition which is not standard in c++, and many more keywords.
Also GCC supports many C++11 features that VS does not support yet.

http://wiki.apache.org/stdcxx/C%2B%2B0xCompilerSupport

GCC supports almost all of them.
GCC has just a big disadvantage. code compilation time, takes more than other compilers, I don't know why.
Jan 2, 2013 at 1:11am
@majidkamali1370
Both GCC and VS implement some language extensions that aren't standard. And both implement many C++11 features, neither supports all. AFAIK you cannot enable GC in unmanaged C++ in VS.
Jan 2, 2013 at 2:30am
@naraku9333
Yes, both have non-standard c++ extensions but VS's is much more.
AFAIK, you can use GC as far as you don't use multiple inheritance.
Jan 2, 2013 at 3:29am
> Both GCC and VS implement some language extensions that aren't standard.

You don't have to use the non-standard extensions.

Unfortunately, 'conform to the standard' is not the default in either. So

GCC: > g++ -std=c++11 -pedantic-errors ....

Microsoft: > CL /Za ...

Last edited on Jan 2, 2013 at 4:00am
Jan 2, 2013 at 6:09am
AFAIK, you can use GC as far as you don't use multiple inheritance.


It has nothing to do with inheritance, it has to do with the target. You can only use the .NET garbage collector if you are targeting a .NET assembly. If you are targeting native binary, then there is no implicit garbage collector and C++/CLI (or the older "Managed Extensions for C++") language extensions are not enabled.
Jan 2, 2013 at 6:54am
Regarding Visual Studio language extensions (enabling /Za switch), without them you cannot compile any C or C++ program, just tried with this sample code (created empty project, no precompiled headers):
1
2
3
4
5
6
#include <iostream>
#include <Windows.h>
int main() {
	std::cout << "Hello, World!" << std::endl;
	return 0;
}


If I remove <windows.h> the code compiles, but without windows.h header we cannot write much for windows platform, don't you think ?
Jan 2, 2013 at 9:14am
> If I remove <windows.h> the code compiles,
> but without windows.h header we cannot write much for windows platform, don't you think ?

Yes, but then if we are writing code specifically for the windows platform, the code is not portable anyway. Why worry about non-standard extensions; they are not going to hurt us.

The idea is that if a program consists of, say, 20 translation units, we should still be able to write, say, 16 of them in a completely portable manner.
Jan 2, 2013 at 8:35pm
closed account (18hRX9L8)
TDM - GCC 4.6.1 64-bit
Orwell Dev C++
http://orwelldevcpp.blogspot.com/2012/12/dev-c-5304-released.html
Last edited on Jan 2, 2013 at 8:47pm
Jan 2, 2013 at 11:44pm
majidkamali1370 wrote:
Also GCC supports many C++11 features that VS does not support yet.


Does that include the latest version? (VS 2012)
Jan 3, 2013 at 7:19am
Does that include the latest version? (VS 2012)


In this link there are first versions that implement features

http://wiki.apache.org/stdcxx/C%2B%2B0xCompilerSupport
Pages: 12