nirm03 / SublimeLinter-clang

SublimeLinter plugin for C/C++, using clang
MIT License
56 stars 48 forks source link

Options #25

Open ci70 opened 8 years ago

ci70 commented 8 years ago

Why are the options hard coded in the plugin? I am trying to launch a batch file before clang launches. It seems it's impossible.

Looking at linter.py it has its own options it seems no way to override it.

For example on Windows you must do this or the compiler will not recognize any headers.


"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvars32.bat"
clang main.cpp -fms-compatibility-version=19.00 -m32 -o c:\main.exe
Optiligence commented 8 years ago

What is hard-coded here? The executable? That’s actually quite reasonable…

On Windows the plugin is intended to be used with a mingw-based clang (see msys2).

You would need to call a wrapper script instead of the executable in your case. (which would need this option) You could use a wrapper script for sublime instead. Or edit linter.py yourself. Or just use mingw-clang.

ci70 commented 8 years ago

I have modified it. Now it's much much better.

http://paste.ie/view/854c7995