I’m new to sublime, and trying to configure SublimeClang package. I’ve wrote opengl c++ program and made it work by compiling manually in console with a single line (using mingw-g++), but clang fails with alot of an odd errors in VS headers, which I didn’t even included anywhere.
Here’s list of all my includes in my working code:
#include <iostream>
#include <vector>
#include <fstream>
#include <sstream>
#include <GL/glew.h>
#include <GL/gl.h>
#include <GL/glext.h>
#include <GL/freeglut.h>
Here’s my user-settings for SublimeClang package:
[code] {
// I was trying to remove clang’s default headers to fix this
“dont_prepend_clang_includes”: true,
// I was trying to make it analyze in different way, but not sure if that's correct. Anyway it didn't made any visible difference
//"analyzer_commandline":
//
// "g++",
// "-S",
// "-" // and what does this means?
//],
"options": "-IC:\\MinGW\\include\\"],
"debug_options": true
}
[/code]
Here’s the clang’s output I keep getting:
:0,0 - Fatal - too many errors emitted, stopping now [Disable with -ferror-limit=0]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\cmath:37,13 - Error - no member named 'abs' in the global namespace
C:/MinGW/include\stdio.h:154,21 - Error - definition of variable with array type needs an explicit size or an initializer
C:/MinGW/include\stdlib.h:196,22 - Error - definition of variable with array type needs an explicit size or an initializer
C:/MinGW/include\wctype.h:99,33 - Error - definition of variable with array type needs an explicit size or an initializer
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\cwchar:25,52 - Error - no member named 'fgetws' in the global namespace
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\cwchar:26,13 - Error - no member named 'fputws' in the global namespace
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\cwchar:27,34 - Error - no member named 'getwc' in the global namespace
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\cwchar:27,53 - Error - no member named 'getwchar' in the global namespace
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\cwchar:29,34 - Error - no member named 'putwc' in the global namespace
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\cwchar:29,53 - Error - no member named 'putwchar' in the global namespace
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\iosfwd:310,3 - Error - no member named 'wmemcpy_s' in the global namespace
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\iosfwd:407,3 - Error - no member named 'wmemcpy_s' in the global namespace
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\iosfwd:504,3 - Error - no member named 'memcpy_s' in the global namespace
C:/MinGW/include\ctype.h:112,33 - Error - redefinition of '_ctype'
C:/MinGW/include\ctype.h:112,33 - Error - definition of variable with array type needs an explicit size or an initializer
C:/MinGW/include\ctype.h:117,34 - Error - redefinition of '_pctype_dll'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\system_error:23,33 - Error - use of undeclared identifier 'EAFNOSUPPORT'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\system_error:24,19 - Error - use of undeclared identifier 'EADDRINUSE'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\system_error:25,26 - Error - use of undeclared identifier 'EADDRNOTAVAIL'
:0,0 - Fatal - too many errors emitted, stopping now [Disable with -ferror-limit=0]
So why it keep try including that headers? Where it even found their location anyway? It isn’t written in %path% or anywhere in sublime settings…
Sorry if this thread isn’t the right place to ask this question, just idk where it is.