RyanJ wrote:OnOff wrote:Clang analysis shows errors in headers mingw, but i compile the project with mingw32-g++ without errors or warnings.
My guess is missing include paths or a missing preprocessor define.
Yes. This is my experience after spending a couple of days fiddling with the plugin to get everything working, hope it helps someone.
Turning off the error limit (-ferror-limit=0) is helpful for debugging this kind of stuff.
To fix the winbase.h DECLSPEC_NORETURN error add the define __GNUC__=4
To fix "no member named 'fgetws' in the global namespace" etc in cwchar when using <string> add the define __MSVCRT__
Include paths will vary by MinGW distribution and/or version, this is what works for me using the 4.7.2 package from nuwen.net;
- Code: Select all
"options":
[
"-ferror-limit=0",
"-D__GNUC__=4",
"-D__MSVCRT__",
"-isystem", "C:\\MinGW\\lib\\gcc\\i686-pc-mingw32\\4.7.2",
"-isystem", "C:\\MinGW\\lib\\gcc\\i686-pc-mingw32\\4.7.2\\include",
"-isystem", "C:\\MinGW\\lib\\gcc\\i686-pc-mingw32\\4.7.2\\include-fixed",
"-isystem", "C:\\MinGW\\include",
"-isystem", "C:\\MinGW\\include\\c++\\4.7.2",
"-isystem", "C:\\MinGW\\include\\c++\\4.7.2\\i686-pc-mingw32",
"-Wall"
]
Great plugin, thanks very much