clang incorrectly using visual studio include path

Hello,

I have a small “helloWorld” application that I am trying to compile with clang. I am using MinGW (with GCC 3.4.5) as the “internal” compiler in eclipse CDT to successfully build and run the app. However when I attempt to compile with clang++ like this:

C:\Projects\LLVM\LLVM\bin\Debug>clang++ -S -emit-llvm -o out.txt “C:\Documents and Settings\toryb\workspace\HelloWorld\helloworld.cpp”

I get:

In file included from C:\Documents and Settings\toryb\workspace\HelloWorld\helloworld.cpp:9:
In file included from c:\Program Files\Microsoft Visual Studio 9.0\VC\include/iostream:6:
In file included from c:\Program Files\Microsoft Visual Studio 9.0\VC\include/istream:6:
In file included from c:\Program Files\Microsoft Visual Studio 9.0\VC\include/ostream:6:
In file included from c:\Program Files\Microsoft Visual Studio 9.0\VC\include/ios:6:
In file included from c:\Program Files\Microsoft Visual Studio 9.0\VC\include/xlocnum:6:
In file included from c:\Program Files\Microsoft Visual Studio 9.0\VC\include/climits:5:
c:\Program Files\Microsoft Visual Studio 9.0\VC\include/yvals.h(529) : error:
cannot combine with previous ‘_Bool’ declaration specifier
typedef bool _Bool;
^

fatal error: too many errors emitted, stopping now
20 errors generated.

However, the gcc compiler is correctly using C:\Program Files\MinGW\include\c++\3.4.5\iostrem.

How can I get clang to quit using my visual studio includes?

Thanks in advance for any help.

Tory

More info on my configuration:
I’m using Windows XP with Visual Studio 2008 installed and MinGW 5.1.6 & the MinGW port of GCC 3.4.5.

here is a partial list of my environment variables:

CLIENTNAME=Console
CommonProgramFiles=C:\Program Files\Common Files
ComSpec=C:\WINDOWS\system32\cmd.exe
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\toryb
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\Program Files\BullseyeCoverage\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\NTRU Cryptosystems\NTRU TCG Software Stack\bin;C:\Program Files\Wave Systems Corp\Gemalto\Access Client\v5;C:\Program Files\Gemplus\GemSafe Libraries\BIN;C:\Program Files\Common Files\Roxio Shared\DLLShared;C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared;c:\Program Files\Microsoft SQL Server\90\Tools\binn;C:\Program Files\doxygen\bin;C:\Program Files\Common Files\Aagard Shared;C:\Program Files\Code Collaborator Client;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\CMake 2.8\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\gnuwin32\bin;C:\Program Files\MinGW\bin;C:\Program Files\Microsoft Visual Studio 2008 SDK\VisualStudioIntegration\Tools\Sandcastle\ProductionTools
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.PSC1
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 10, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=0f0a
ProgramFiles=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
RoxioCentral=C:\Program Files\Common Files\Roxio Shared\9.0\Roxio Central33
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\toryb\LOCALS~1\Temp
TMP=C:\DOCUME~1\toryb\LOCALS~1\Temp
USERPROFILE=C:\Documents and Settings\toryb
VS90COMNTOOLS=c:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools
VSSDK90Install=C:\Program Files\Microsoft Visual Studio 2008 SDK
windir=C:\WINDOWS
_vcee_autoexp=C:\Documents and Settings\toryb\My Documents\DebugVisualizer\visualizers.txt