使用MinGW 4.7.0,MSYS編譯的Clang 3.2。Clang ++通過命令行工作,但不通過SublimeClang(Win8x64)工作SublimeText
我通過自動安裝/下載了MinGW的,並且內置鏘以下說明:http://bencode.net/clangonwindows
調用的 「g ++ - 版本」 上的PowerShell返回:enter code here
呼喚「鐺-v 「在PowerShell會返回:clang version 3.2 (trunk 167353) Target: i686-pc-mingw32 Thread model: posix
我創建了一個小測試文件,以檢查是否鐺是WO rking,「test.cpp」:
#include <iostream>
class clangIsCool
{
public:
int x;
int y;
};
int main()
{
clangIsCool *c;
std::cout << c->x * 10;
return 0;
}
調用「clang ++ test.cpp」給了我沒有錯誤。
然後,我使用Package Control爲SublimeText2獲得了SublimeClang。
SublimeClang可以在這裏找到:https://github.com/quarnster/SublimeClang
加載「TEST.CPP」在SublimeText2並試圖編譯給了我這些錯誤:
C:/MinGW/include\wctype.h:99,33 - Error - definition of variable with array type needs an explicit size or an initializer
C:/MinGW/lib/gcc/mingw32/4.7.0/include/c++\cwchar:145,11 - Error - no member named 'fgetws' in the global namespace
C:/MinGW/lib/gcc/mingw32/4.7.0/include/c++\cwchar:147,11 - Error - no member named 'fputws' in the global namespace
C:/MinGW/lib/gcc/mingw32/4.7.0/include/c++\cwchar:151,11 - Error - no member named 'getwc' in the global namespace
C:/MinGW/lib/gcc/mingw32/4.7.0/include/c++\cwchar:152,11 - Error - no member named 'getwchar' in the global namespace
C:/MinGW/lib/gcc/mingw32/4.7.0/include/c++\cwchar:157,11 - Error - no member named 'putwc' in the global namespace
C:/MinGW/lib/gcc/mingw32/4.7.0/include/c++\cwchar:158,11 - Error - no member named 'putwchar' 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'
我檢查SublimeClang的設置,這就是選擇鐺正在使用:
"options":
[
"-isystem", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/",
"-isystem", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/c++/4.2.1",
"-F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/",
"-isystem", "C:\\MinGW\\lib\\gcc\\mingw32\\4.7.0\\include",
"-isystem", "C:\\MinGW\\lib\\gcc\\mingw32\\4.7.0\\include\\c++",
"-isystem", "C:\\MinGW\\lib\\gcc\\mingw32\\4.7.0\\include\\c++\\mingw32",
"-isystem", "C:\\MinGW\\include",
"-Wall"
],
我試圖弄亂與包含路徑(即使他們看起來正確,但我),但錯誤s直到保持。
SublimeClang的選項中是否還有其他路徑?
有沒有辦法查看clang默認使用哪些路徑(因爲它是從命令行運行的),以便我可以將它們與默認的SublimeClang進行比較?