Reputation: 157
I am trying to compile my project via clang++, version 3.4. I am using flag -std=gnu++11, and it fails.
Earlier I used llvm 3.3 and everything was OK. but now i have such error message:
clang (LLVM option parsing): Unknown command line argument '-std=gnu++11'. Try: 'clang (LLVM option parsing) -help'
clang (LLVM option parsing): Did you mean '-stats=gnu++11'?
Upvotes: 0
Views: 1611
Reputation:
Testing shows that this error can come up when some other bogus options get used. For example:
$ clang -mllvm -std=gnu++11 test3.cc -o test3 clang (LLVM option parsing): Unknown command line argument '-std=gnu++11'. Try: 'clang (LLVM option parsing) -help' clang (LLVM option parsing): Did you mean '-stats=gnu++11'?
The -mllvm
option tells clang to not process the -std=gnu++11
option itself, but to pass it on to LLVM. But LLVM has no idea what this option means.
To solve the problem, make sure your other options are correct; the error message is leading you to think the problem is somewhere it isn't.
Upvotes: 5