Reputation: 8653
Can someone point to flags and setup changes required for one to compile C++0x code on a Eclipse CDT on mac please ?
Upvotes: 2
Views: 2956
Reputation: 32661
The latest Apple gcc compiler is gcc 4.2 which does not support C+11 code. You need to install a gcc 4.6 - this can be done from source or there are some binaries at hpc this put the gcc in /usr/local/bin Then use that in the preferences fot the C++ compiler in eclipse.
Alternative for Lion and above Xcode 4.* includes clang the latest version of which doies much of C+11
If you want a later gcc macports (and fink and homebrew) have a later version as a port. As of July 2012 macports has 4.7.1 and a 4.8 beta. The package managers are often the easiest way to get complex compiled code onto your machine and they also have centrally compiled versions that will be downloaded by default.
Upvotes: 3
Reputation: 2479
To use C++0x in Eclipse CDT on OSX (in a managed make project):
Upvotes: 6