mitaki28 / vscode-clang

Completion and Diagnostic for C/C++/Objective-C using Clang
MIT License
128 stars 24 forks source link

Unrecognized command line option error using alternative g++ compiler #59

Closed ddydng closed 7 years ago

ddydng commented 7 years ago

After setting "clang.executable": "g++-4.9" I get following error:

Please check your configurations: g++-4.9: error: unrecognized command line option '-fno-caret-diagnostics'

g++-4.9 installed via brew install gcc49 and confirmed to be working in terms of compiling.

I'm not sure if this option is intended to be used like this but I'm looking for a workaround to use Homebrew installed g++ of higher versions instead of the default mac os clang. Now this plugin has done a good job helping me with compiler checking but I really appreciate it if it could work with other g++ executable alternatives of higher versions.

ddydng commented 7 years ago

Okay this setting is intended for clang not gcc. Install alternate clang first and set the path pointing to that installation.