C2061:语法错误:qtypetraits.h 中的标识符'L'
C2061: syntax error : identifier 'L' in qtypetraits.h
这已经花费了我相当长的时间,所以如果其他人有这个问题,这里是:
我有一个使用Visual Studio 2013和CPP Rest SDK的C++项目。现在我们开始使用Qt(版本5.6),所以我在代码中添加了Qt对象。
我一直收到这个错误消息:
C:QtQt5.6.05.6msvc2013_64includeQtCore/qtypetraits.h(523): warning C4003: not enough actual parameters for macro 'U'
C:QtQt5.6.05.6msvc2013_64includeQtCore/qtypetraits.h(523): warning C4003: not enough actual parameters for macro '_XPLATSTR'
C:QtQt5.6.05.6msvc2013_64includeQtCore/qtypetraits.h(523): error C2061: syntax error : identifier 'L'
C:QtQt5.6.05.6msvc2013_64includeQtCore/qtypetraits.h(527) : see reference to class template instantiation 'QtPrivate::is_default_constructible<T>' being compiled
这不是Qt的错。这是CPP Rest SDK。它定义了一个宏U
,它很高兴地被qtypetracts.h中的U
模板参数所取代。
当我在C++预处理器定义中定义_TURN_OFF_PLATFORM_STRING
时,错误消失了。
相关文章:
- 错误 C2760:语法错误:映射迭代器上意外的标记"标识符",预期的";"
- 语法错误:D3DX10Core 中的标识符'TEXTMETRICA'
- 错误 C2146:语法错误:标识符"A1"之前缺少","
- 主.cpp(12):错误 C2061:语法错误:标识符"vec1"
- 错误 C2146:语法错误:按函数传递映射时标识符 mType 之前缺少','
- 如何修复可视化工作室中的"C2061语法错误标识符"堆栈?
- 是否有任何法律语法允许引号出现在 javascript 中的标识符字符旁边?(如"so")
- 错误 C2061:语法错误:标识符'_bstr_t'
- C++结构错误 - 错误 C2061:语法错误:标识符
- 错误 CC2061:语法错误:标识符"GLUquadric"
- C2061:语法错误:qtypetraits.h 中的标识符'L'
- C++自定义头文件 - 语法错误 C2061:标识符
- 错误 C2061:语法错误:标识符'map'
- boost::p roperty_tree 编译错误(错误 C2061:语法错误:标识符"p")
- C++错误 C2061:语法错误:标识符'FILE' jpeglib 问题?
- 错误 C2061:语法错误:标识符'string'
- 错误 C2061:语法错误:使用 cURL 时标识符'acosf'
- #define 带有 L 标识符的语法
- 语法错误:编译 winnt.h 时缺少标识符'PVOID64'之前的';'
- 链表错误:语法错误:标识符'head'之前缺少';'