首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >未能在windows上生成Clang3.0,未定义同一性"PSRWLOCK“。为什么?

未能在windows上生成Clang3.0,未定义同一性"PSRWLOCK“。为什么?
EN

Stack Overflow用户
提问于 2012-02-16 04:10:56
回答 1查看 523关注 0票数 0

我按照构建说明下载了最新的LLVM3.0和Clang3.0源代码,最后获得VS解决方案文件"LLVM.sln“和所有.vcproj文件。

然后我构建了libClang,但是在构建项目"LLVMSupport":error C2065:“PSRWLOCK”:未定义标识符时出现了一些错误

位于RWMutex.cpp的问题包括"Windows/RWMutex.inc“。在"RWMutex.inc“文件中,我注意到一个代码块:

代码语言:javascript
复制
// 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++编译器?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-02-16 07:43:29

不幸的是,VC2005并不很好地支持标准C++来编译llvm/clang。我们在过去看到了许多问题。因此,建议改用it 2008/it 2010。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/9305427

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档