我按照构建说明下载了最新的LLVM3.0和Clang3.0源代码,最后获得VS解决方案文件"LLVM.sln“和所有.vcproj文件。
然后我构建了libClang,但是在构建项目"LLVMSupport":error C2065:“PSRWLOCK”:未定义标识符时出现了一些错误
位于RWMutex.cpp的问题包括"Windows/RWMutex.inc“。在"RWMutex.inc“文件中,我注意到一个代码块:
// Windows has slim read-writer lock support on Vista and higher, so we
// will attempt to load the APIs. If they exist, we will use them, and
// if not, we will fall back on critical sections. When we drop support
// for XP, we can stop lazy-loading these APIs and just use them directly.
#if defined(__MINGW32__)
// Taken from WinNT.h
typedef struct _RTL_SRWLOCK {
PVOID Ptr;
} RTL_SRWLOCK, *PRTL_SRWLOCK;
// Taken from WinBase.h
typedef RTL_SRWLOCK SRWLOCK, *PSRWLOCK;
#endif
...什么意思?我是否应该定义"MINGW32“,即使我使用的是Microsoft C++编译器?
发布于 2012-02-16 07:43:29
不幸的是,VC2005并不很好地支持标准C++来编译llvm/clang。我们在过去看到了许多问题。因此,建议改用it 2008/it 2010。
https://stackoverflow.com/questions/9305427
复制相似问题