Make GCC 4.7

I downloaded the gcc 4.7.0 package, went through the documentation for make and building, install etc many times, but its all way above my understanding. Its maybe because I have been a windows user and new to C++, so , most of it seems Unix to me. Can some one help me out. I want to use gcc 4.7.0 with MinGW, I have already MinGW with 4.6.1 and as I went through the documentation, it does not support the -std flag for C-11 features, which is the main reason for updating.
Actually, it does.

 
g++ -std=c++0x stuff


It's just not called c++11 there, but it really means the same thing. Gcc 4.7 supports a few more features, but not all of them either.
tried
-std=c++0x flag
but does not work for me with those features, can some one help me build gcc 4.7.0 or advise any compiler which fully supports c++11?
You could just download and install a pre-built MinGW + GCC 4.7 binary.

Here are three of them; take your pick:
http://nuwen.net/mingw.html
http://sourceforge.net/projects/mingwbuilds/
http://www.equation.com/servlet/equation.cmd?fa=fortran
or advise any compiler which fully supports c++11?

There aren't any. Your best bets are gcc 4.7 and the soon-to-be-released clang 3.1.
Both support the majority of C++11 features.

but does not work for me with those features

Which features?
Last edited on
@JLBorges
Thanks You

@Athar

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
///c0x.cpp
#include <iostream>

using namespace std;

int main(){
	
	int x =10;
	
	for(int a : x){
	
	cout  << a;
	
	}

}


g++ c0x.cpp -o c0x.exe -std=c++0x

error: no matching function for call to 'begin(int&)'
error: no matching function for call to 'end(int&)'
Well, the code snippet makes no sense. You're not using the range-based for on a container/range, but on a simple variable. You can make use of intializer lists, though: for(int a : {x})...
range based for loops require the thing to be iterated over to be
a (fixed size) array OR
an object that has "begin" and "end" functions that return iterators.
Last edited on
@Athar, @hanst99
Thank you, I realized that the problem is with my code and not the compiler, but in the quest I found some thing I was long striving for gcc 4.7

@JLBorges
Special thanks
I would like to leave some thing for other like me.

http://sourceforge.net/projects/mingwbuilds/

offers Dual-target(i686/x86_64) MinGW compiler for i686/x86_64 hosts
which seems to be for a 64bit OS, did not work for me on WinXP 32bit

http://nuwen.net/mingw.html
Worked fine for me and includes much more

http://www.equation.com/servlet/equation.cmd?fa=fortran
Seems promising but, did not tried so if any one has some thing to say, can please share for the benefit of others


Last edited on
The Equation build has OpenMP support (and also includes the FORTRAN compiler).
Topic archived. No new replies allowed.