c++ - Configuring Flycheck to work with C++11 -


i having significant trouble configuring flycheck c++11. right now, flycheck flagging things std::to_string(). checker using g++. can add in .emacs file such flycheck assume c++11 default?

flycheck provides option flycheck-gcc-language-standard purpose. should not set globally, because break checking of c files, can set c++-mode-hook following code in init file:

(add-hook 'c++-mode-hook (lambda () (setq flycheck-gcc-language-standard "c++11"))) 

however, recommend against this. instead, use directory variables configure language standard per project.

open root directory of project in dired c-x d, , type m-x add-dir-local-variable ret c++-mode ret flycheck-gcc-language-standard ret "c++11". create .dir-locals.el file in root directory of project. emacs reads file whenever visit file directory or subdirectory, , sets variables according rules in file. specifically, emacs set language standard flycheck syntax checking c++ 11 c++ files in project.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -