Building clang on Win 7 with Vis C++ 2008,

My Configuration:

Microsoft Visual Studio 2008
Version 9.0.30729.1 SP
Microsoft .NET Framework
Version 3.5 SP1

Installed Edition: VC Express

Microsoft Visual C++ 2008 91909-152-0000052-60589
Microsoft Visual C++ 2008

The Problem:

Followed steps on http://clang.llvm.org/get_started.html. Had to change the svn co lines slightly.

Build mostly goes OK except for LLVMCodeGen:

1>…\llvm\tools\clang\lib\CodeGen\CGDebugInfo.cpp(67) : error C2784: ‘cast_retty<X,Y*>::ret_type llvm::dyn_cast_or_null(Y *)’ : could not deduce template argument for ‘Y *’ from ‘llvm::WeakVH’
Refers to source line: return llvm::DIDescriptor(dyn_cast_or_nullllvm::MDNode(I->second));

I: llvm::DenseMap<const Decl *, llvm::WeakVH>::iterator

1>…\llvm\tools\clang\lib\CodeGen\CGDebugInfo.cpp(1484) : error C2784: ‘cast_retty<X,Y*>::ret_type llvm::dyn_cast_or_null(Y *)’ : could not deduce template argument for ‘Y *’ from ‘llvm::WeakVH’
Refers to source line: llvm::DIDescriptor SP(dyn_cast_or_nullllvm::MDNode(FI->second));

FI : llvm::DenseMap<const FunctionDecl *, llvm::WeakVH>::iterator

Looks like compiler can’t make a Y* from llvmWeakVH.

Any ideas?

Thanks,

Rolf

Hi

Try updating to the latest Visual C++ 2008 Express version.

link: http://www.microsoft.com/express/Downloads/#2008-Visual-CPP

Latest version number: Microsoft Visual C++ 2008 91909-152-0000052-60816
I just did a complete build with that version and it worked 100%.
Just some warnings but you can ignore that.

Thanks Francois. I actually ended up with:

Microsoft Visual Studio 2010
Version 10.0.30319.1 RTMRel
Microsoft .NET Framework
Version 4.0.30319 RTMRel

Installed Version: VC Express

Microsoft Visual C++ 2010 01013-169-2610014-70293
Microsoft Visual C++ 2010

That fixed the problem, I just wish I could explain why.

Rolf