Reputation: 3412
I am using g++ version 4.8.5. I am trying to compile my project using it. It compiles without a problem, when compiling directly from the terminal. But, when using a make file, it gives me following error, even though I am using the same option.
cc1plus: error: unrecognized command line option "-std=c++11"
What am I doing wrong here ?
Edit:
as requested, here's my makefile
line:
main: main.cc
@g++ -std=c++11 main.cpp -o run
Upvotes: 2
Views: 4052
Reputation: 231
Try using g++'s absolute path:
main: main.cc
@/usr/bin/g++-4.8 -std=c++11 main.cpp -o run
Upvotes: 3