Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Help. -std=c++11 or -std=gnu++11 compiler options.(Trying to generate random numbers for a normal distribution.)
Help. -std=c++11 or -std=gnu++11 compiler options. [message #1043164] Wed, 17 April 2013 11:11 Go to next message
Carlos Catalan Garcia is currently offline Carlos Catalan Garcia
Messages: 2
Registered: April 2013
Junior Member
Hi
I'm trying to create a random number simulation for a Normal Distribution to deal with a MonteCarlo simulation. I decided to run it through the random generetor contained by (already added in the code)
#include <random>

Although the code seems to be right, I get the following error in the eclipse's console:
____________________________________________________________________________________
Building file: ../src/MonteCarlo.cpp
Invoking: Cross G++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/MonteCarlo.d" -MT"src/MonteCarlo.d" -o "src/MonteCarlo.o" "../src/MonteCarlo.cpp"
In file included from /usr/include/c++/4.7/random:35:0,
from ../src/MonteCarlo.cpp:8:
/usr/include/c++/4.7/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
make: *** [src/MonteCarlo.o] Error 1
_____________________________________________________________________________________

The random.h is ready to be used. It's placed in my project:includes and then /usr/include/c++/4.7/random (as you could see).

Is that something wrong with the software? could I continue using Eclipse to finish my project?

I might say, I'm using the eclipse software in ubuntu 12.

Could someone help me???
Re: Help. -std=c++11 or -std=gnu++11 compiler options. [message #1043865 is a reply to message #1043164] Thu, 18 April 2013 08:00 Go to previous messageGo to next message
Axel Mueller is currently offline Axel Mueller
Messages: 1963
Registered: July 2009
Senior Member
http://wiki.eclipse.org/CDT/User/FAQ#CDT_does_not_recognize_C.2B.2B11_features

Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
icon6.gif  Re: Help. -std=c++11 or -std=gnu++11 compiler options. [message #1044005 is a reply to message #1043865] Thu, 18 April 2013 11:30 Go to previous message
Carlos Catalan Garcia is currently offline Carlos Catalan Garcia
Messages: 2
Registered: April 2013
Junior Member
Thanks a lot!!! It seems to work perfectly!!!
Previous Topic:Unresolved inclusion in alternate efs file system
Next Topic:cannot save environment variables on restart
Goto Forum:
  


Current Time: Wed Oct 22 01:45:28 GMT 2014

Powered by FUDForum. Page generated in 0.01578 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software