2

I am trying to run wiringPi Cpp version with raspberryPi. I downloaded this and tryed to run but I go the error below.

enter image description here

What is the problem here? Did I do something wrong?

ffttyy
  • 853
  • 2
  • 19
  • 49

2 Answers2

5

Upgrade your GCC. You appear to have GCC 4.6, and the flag you mention was introduced with GCC 4.7.

Adam
  • 16,808
  • 7
  • 52
  • 98
  • Allthought I install GCC4.7, when I try to run "cmake .", I read again that "C compiler identification is GNU 4.6.3. How can I use GCC 4.7? – ffttyy Dec 11 '15 at 19:12
  • make sure you get the right one when you run `gcc`, and if that fails set the `CC` and `CXX` environment variables to point to your install of gcc 4.7 – Adam Dec 11 '15 at 20:51
3

Run g++ -v on the command line. If the version number is 4.3 through 4.6 replace -std=c++11 with -std=c++0x and see if you get any love. If that still doesn't work, you'll have upgrade the compiler or remove the c++11 features from the library. Seriously recommend the former over the latter.

If the compiler is before version 4.3 definitely upgrade.

edit

I need to read more goodly. skip getting the version number. Try -std=c++0x, then upgrade the compiler if it fails.

Community
  • 1
  • 1
user4581301
  • 33,082
  • 7
  • 33
  • 54