【error C2143】 html
error C2143: 语法错误 : 缺乏“;”(在“类型”的前面)
缘由:以“编译为 C 代码(/TC)”方式编译时,没有把变量定义在函数开始的位置。 shell
【error LNK2019】 ide
error LNK2019: 没法解析的外部符号 _abc,该符号在函数 _xyz 中被引用
缘由:
当前源文件 xyz 中使用了外部符号 abc ,可是没法找到该符号,缘由是没有包含对应的 .lib 库文件。
另外可能的缘由:
函数
【error C2733】 this
error C2733: second C linkage of overloaded function 'wmemchr' not allowed
缘由:针对处于 C++ 模式下的 VC6 以及其它 VS 版本,当进行 ARM 相关编译时应该对要使用的 <wchar.h> 头文件进行 'extern "C++" {}' 处理。
spa
#ifdef __cplusplus extern "C" { #endif # include <wchar.h> #ifdef __cplusplus } #endif
【error C2440】 .net
error C2440: “=”: 没法从“void *”转换为“void **”
缘由:通常会在调用 malloc 函数后将其返回值赋值给其余变量时出现,值得注意的是,出现该错误的前提是按照“编译为 C++ 代码 (/TP)”进行编译,若是按照“编译为 C 代码 (/TC)”进行编译则不会出现该错误。 code
【error C2054】 orm
error C2054: 在“inline”以后应输入“(”缘由:这个错误出如今以“ 编译为 C 代码 (/TC) ”进行编译时,内联函数使用 inline 来标示,而没有使用 __inline 标识。能够在 以“ 编译为 C 代码 (/TC) ”进行编译时,增长宏定义 #define inline __inline 。
【Warning C4251】 htm
warning C4251: 'AClass::m_variable' : class 'SomeTemplate<T>' needs to have dll-interface to be used by clients of class 'AClass'
【Warning C4996】
warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup.
warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS.
缘由:详细缘由须要参考MSDN上的官方说明。