atom-ide-cpp icon indicating copy to clipboard operation
atom-ide-cpp copied to clipboard

How to add flags to the clang?

Open DKarampistis opened this issue 5 years ago • 1 comments

I am trying to add the -std=c++17 flag to the clang command. Adding the option in the main.js like this: const args = ["-std=c++17"] Make the the plugin not to work. Diagnoses show no errors any more no matter what the error is even when the syntax is wrong. Pressing ctrl will no longer allow me to find the reference of the highlighted word. Atom's developer console show no errors. Running the command clang -std=c++17 *.cpp in the project folder works like a charm.

OS: Fedora 33 Atom: 1.53.0 Electron: 6.1.12 Chrome: 76.0.3809.146 Node: 12.4.0 Clang: 11.0.0

DKarampistis avatar Nov 17 '20 13:11 DKarampistis

You probably want to try a compile_flags.txt file: https://clang.llvm.org/docs/JSONCompilationDatabase.html#alternatives (not specific to this Atom plugin)

ell1e avatar Jan 14 '21 22:01 ell1e