markondej / fm_transmitter

Raspberry Pi as FM transmitter
1.32k stars 292 forks source link

It won't make the file #132

Open stubbertville opened 3 years ago

stubbertville commented 3 years ago

When I run the make command it just errors out and says unrecognized command Line option '-std=c++11'

rsaxvc commented 3 years ago

What version of g++ do you have installed?

stubbertville commented 3 years ago

What version of g++ do you have installed?

I'm new to pi os, or Linux in that case, whats that?

rsaxvc commented 3 years ago

TLDR: Your compiler is probably out of date and likely needs upgraded.

Background: g++ is a compiler for the C++ language. c++11 is a specific version of the C++ language, but it's been around for quite a while. "-std=c++11" is a flag to tell g++ which version of the c++ language standard to use. But, "unrecognized command Line option '-std=c++11'" here means g++ did not understand the specified language version, which usually means g++ needs to be updated.

You can find the g++ version by adding the --version flag, just like this "g++ --version". Here's the result from one of my RPi4 for reference:

pi@raspberrypi:~/code/fm_transmitter $ g++ --version
g++ (Raspbian 8.3.0-6+rpi1) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

pi@raspberrypi:~/code/fm_transmitter $

Since the compiler is usually packaged by the same group providing the OS, you might also check your OS version, here's mine:

pi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
pi@raspberrypi:~ $

After reviewing the Raspberry Pi OS Release History, it's quite confusing to me, because even the first Raspberry Pi OS came with GCC/G++ 4.7.2, which didn't support everything but at least knew about the C++11 language version.