0

I needed to specify stdlib options in a certain environment, so I changed the flycheck executable to clang -std=c++11 -stdlib=libc++, which is needed to compile the file.

However, I got the error Error while checking syntax automatically: (error "Output file descriptor of flycheck-c/c++-clang is closed") after doing so, and searches don't turn anything up.

How do I help flycheck out?

1

You don't change the executable, but rather modify flycheck's variables that get translated into a command. In your case, you have to change them like:

(setq flycheck-clang-language-standard "c++11")
(setq flycheck-clang-standard-library "libc++")

You can also customize these variables (by running M-x customize-variable)

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.