升壓

2012-08-11 166 views
0

命令行是升壓

g++ -c -Wall -I "C:/cygwin/usr/include/" test.cpp 

這裏的錯誤消息:

C:/cygwin/usr/include/stdint.h:62:22: error: conflicting declaration 'typedef unsigned int uintptr_t' 
c:/python27/egg-info/mingw/usr/lib/gcc/../../x86_64-w64-mingw32/include/_mingw.h:352:44: error: 'uintptr_t' has a previous declaration as 'typedef long long unsigned int uintptr_t' 
In file included from C:/cygwin/usr/include/boost/assert.hpp:81:0, 
       from C:/cygwin/usr/include/boost/system/error_code.hpp:16, 
       from C:/cygwin/usr/include/boost/filesystem/v3/path_traits.hpp:23, 
       from C:/cygwin/usr/include/boost/filesystem/v3/path.hpp:25, 
       from C:/cygwin/usr/include/boost/filesystem.hpp:35, 

c:/python27/egg-info/mingw/usr/lib/gcc/../../x86_64-w64-mingw32/include/c++/4.5.2/cstdlib:195:11: error: '::strtold' has 
not been declared 
c:/python27/egg-info/mingw/usr/lib/gcc/../../x86_64-w64-mingw32/include/c++/4.5.2/cstdlib:215:22: error: '__gnu_cxx::str 
told' has not been declared 
In file included from c:/python27/egg-info/mingw/usr/lib/gcc/../../x86_64-w64-mingw32/include/c++/4.5.2/bits/postypes.h: 
42:0, 
       from c:/python27/egg-info/mingw/usr/lib/gcc/../../x86_64-w64-mingw32/include/c++/4.5.2/iosfwd:42, 
       from c:/python27/egg-info/mingw/usr/lib/gcc/../../x86_64-w64-mingw32/include/c++/4.5.2/ios:39, 
       from c:/python27/egg-info/mingw/usr/lib/gcc/../../x86_64-w64-mingw32/include/c++/4.5.2/ostream:40, 
       from c:/python27/egg-info/mingw/usr/lib/gcc/../../x86_64-w64-mingw32/include/c++/4.5.2/iostream:40, 
       from C:/cygwin/usr/include/boost/assert.hpp:82, 
       from C:/cygwin/usr/include/boost/system/error_code.hpp:16, 
       from C:/cygwin/usr/include/boost/filesystem/v3/path_traits.hpp:23, 
       from C:/cygwin/usr/include/boost/filesystem/v3/path.hpp:25, 
       from C:/cygwin/usr/include/boost/filesystem.hpp:35, 

任何幫助,我不明白爲什麼python27目錄進行檢查。

回答

1

看起來像python27文件夾包含mingw - 這是cygwin替代。可能默認標題搜索路徑設置爲mingw的dir(c:/ python27/egg-info/mingw/usr/lib/gcc /../../ x86_64-w64-mingw32/include /)。

檢查是以下環境變量設置:

CPATH 
C_INCLUDE_PATH 
CPLUS_INCLUDE_PATH 
OBJC_INCLUDE_PATH 

你也可以嘗試用編譯: 1)-nostdinc選擇忽略默認include目錄 2)-v對詳細g++輸出

+0

感謝,我猜測我安裝了Python,它包含了另一個cygwin副本。 – bbc 2012-08-13 22:54:37