how to write a pass in code::blocks on windows

hi,
I wish to write a pass in code::blocks on windows. My environment is that I have copyed LLVM Binaries for Mingw32/x86 and LLVM-GCC 4.2 Front End Binaries for Mingw32/x86 to mingw ,but I can’t build the llvm source in mingw. So I can use some llvm tools,such as llvm-gcc,on comand line of windows.
However, I can’t build a pass in code::blocks while I have include the ‘include’ floder of llvm source. And it warns as follow.
C:\llvm\llvm-2.8\llvm-2.8\include\llvm\Support\MathExtras.h|17|error: llvm/System/DataTypes.h: No such file or directory|
C:\llvm\llvm-2.8\llvm-2.8\include\llvm\Intrinsics.h|40|error: llvm/Intrinsics.gen: No such file or directory|
C:\llvm\llvm-2.8\llvm-2.8\include\llvm\Support\MathExtras.h||In function ‘bool llvm::isInt(int64_t)’:expressionless:
C:\llvm\llvm-2.8\llvm-2.8\include\llvm\Support\MathExtras.h|38|error: there are no arguments to ‘INT64_C’ that depend on a template parameter, so a declaration of ‘INT64_C’ must be available|
C:\llvm\llvm-2.8\llvm-2.8\include\llvm\Support\MathExtras.h|38|note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)|
C:\llvm\llvm-2.8\llvm-2.8\include\llvm\Support\MathExtras.h|38|error: there are no arguments to ‘INT64_C’ that depend on a template parameter, so a declaration of ‘INT64_C’ must be available|
C:\llvm\llvm-2.8\llvm-2.8\include\llvm\Support\MathExtras.h||In function ‘bool llvm::isUInt(uint64_t)’:expressionless:
C:\llvm\llvm-2.8\llvm-2.8\include\llvm\Support\MathExtras.h|57|error: there are no arguments to ‘UINT64_C’ that depend on a template parameter, so a declaration of ‘UINT64_C’ must be available|
C:\llvm\llvm-2.8\llvm-2.8\include\llvm\Module.h|269|error: expected ‘;’ before ‘END_WITH_NULL’|
C:\llvm\llvm-2.8\llvm-2.8\include\llvm\Module.h|273|error: expected ‘;’ before ‘END_WITH_NULL’|
C:\llvm\llvm-2.8\llvm-2.8\include\llvm\DerivedTypes.h|260|error: expected ‘;’ before ‘END_WITH_NULL’|
C:\llvm\llvm-2.8\llvm-2.8\include\llvm\Intrinsics.h|42|error: expected identifier before ‘,’ token|
C:\llvm\llvm-2.8\llvm-2.8\include\llvm\Support\CommandLine.h|349|error: expected initializer before ‘values’|
\CodeSurfer\new_llvm\PredictIns.cpp||In member function ‘virtual bool::PredictIns::runOnModule(llvm::Module&)’:expressionless:
\CodeSurfer\new_llvm\PredictIns.cpp|61|warning: unused variable ‘p1’|
\CodeSurfer\new_llvm\PredictIns.cpp|96|warning: unused variable ‘brbtuser’|
\CodeSurfer\new_llvm\PredictIns.cpp|131|warning: no return statement in function returning non-void|

=== Build finished: 10 errors, 3 warnings ===|
I consider the reason is that I doun’t build the llvm source. How should I build the llvm source!
Thanks!
Tang