I am very pleased to find out that GCC 4.6 supports the range-based for loop. I found an experimental release of MinGW 4.6 on xvidvideo.ru, is that a well-known, reliable website? What other options do I have (besides compiling myself from source code)?
相关问题
- Sorting 3 numbers without branching [closed]
- How to compile C++ code in GDB?
- Why does const allow implicit conversion of refere
- thread_local variables initialization
- What uses more memory in c++? An 2 ints or 2 funct
相关文章
- Class layout in C++: Why are members sometimes ord
- How to mock methods return object with deleted cop
- Which is the best way to multiply a large and spar
- C++ default constructor does not initialize pointe
- Selecting only the first few characters in a strin
- What exactly do pointers store? (C++)
- Converting glm::lookat matrix to quaternion and ba
- What is the correct way to declare and use a FILE
I wanted to try out GCC 4.7 using the latest
Code::Blocks
under Windows 7.Here's how I did it for myself, YMMV:
I downloaded the latest Equation GCC file at: ftp://ftp.equation.com/gcc/ and installed it under the directory
C:\gcc\
on my local machine. The installer makes the necessary changes to the path environment variable. Logging off and on will pick them up.I downloaded the
Code::Blocks
latest nightly build at: http://forums.codeblocks.org/index.php?board=20.0 and followed the setup instructions.After following the setup instructions (including about the needed DLL files), and starting C::B for the first time;
I chose 'GNU GCC Compiler', and 'Set as default' for the 'Compilers auto-detection' window.
Under the 'Settings > Compiler... > Compiler settings' tab: I ticked the 'Have g++ follow the coming C++0x ISO C++ language standard [-std=c++0x]' checkbox on.
Under the 'Settings > Compiler... > Toolchain executables' tab: I changed the 'Compiler's installation directory' entry field to
C:\gcc\bin\
.I changed the names of these files physically located in the
C:\gcc\bin\
directoryto match the listed name requirements in
Code::Blocks
. You can simply browse to set the correct files (I just personally preferred renaming to match C::B's entries).If everything went correctly, you should be able to create this program:
and run it OK under Code::Blocks with F9.
Thanks to everyone for all the excellent work put into bringing this great new language to us. Happy C++0x computing!
Bud Alverson (sorry for the very basic nature of this post) :)
I'm not really familiar with the site you linked as it's in Russian. The only other place I've found that offers current snapshots of GCC's build is from Equation Solution. I downloaded gcc4.5.1 from there and it's been working fairly well for me. I haven't tried the 4.6.x release yet however. Rumor has it that gcc 4.6.x is slower than its predecessors.
Please do report back what kind of results you're seeing if you do decide experimenting. I'm curious about what improvements they've done in the 4.6.x series.