积极答复者
error LNK2001: 无法解析的外部符号 "public: __thiscall CRect::CRect(void)" (??0CRect@@QAE@XZ)

问题
答案
-
这个错误怎么解决?谢谢!
你好,
无法解析外部符号,导致错误的原因,可能是引用变量,函数时,这个连接器没能发现包含这些变量的库,以及obj文件。
也有可能是升级managed 库时从低版本的visual studio,/ZI编译选项被加入到命令行中,也会导致这个错误,解决这种错误是移除这个命令。
如果你使用内联函数,定义在.cpp文件中,而不是在头文件中,也会导致这样的错误。
引用函数或者数据时,没有特别指明外部的链接,也会导致这个错误。
详细的信息你可以看一下这个文档. https://msdn.microsoft.com/en-us/library/f6xx1b1z.aspx
你有什么问题,请及时联系我,如果问题解决了,也请你告诉我。
- 已建议为答案 Hart WangModerator 2016年4月27日 8:20
- 已标记为答案 华本庶 2016年4月28日 1:33
-
问题解决了,谢谢!
很高兴听到你说,问题已经解决了,请mark帖子.
谢谢
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.
- 已编辑 Hart WangModerator 2016年4月27日 8:24
- 已标记为答案 华本庶 2016年4月28日 1:33
全部回复
-
这个错误怎么解决?谢谢!
你好,
无法解析外部符号,导致错误的原因,可能是引用变量,函数时,这个连接器没能发现包含这些变量的库,以及obj文件。
也有可能是升级managed 库时从低版本的visual studio,/ZI编译选项被加入到命令行中,也会导致这个错误,解决这种错误是移除这个命令。
如果你使用内联函数,定义在.cpp文件中,而不是在头文件中,也会导致这样的错误。
引用函数或者数据时,没有特别指明外部的链接,也会导致这个错误。
详细的信息你可以看一下这个文档. https://msdn.microsoft.com/en-us/library/f6xx1b1z.aspx
你有什么问题,请及时联系我,如果问题解决了,也请你告诉我。
- 已建议为答案 Hart WangModerator 2016年4月27日 8:20
- 已标记为答案 华本庶 2016年4月28日 1:33
-
-
问题解决了,谢谢!
很高兴听到你说,问题已经解决了,请mark帖子.
谢谢
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.
- 已编辑 Hart WangModerator 2016年4月27日 8:24
- 已标记为答案 华本庶 2016年4月28日 1:33