本文主要是介绍error LNK2001: unresolved external symbol memset,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
关于程序中没有引用memset函数,却在链接阶段报错提示无法找到memset函数的问题解决方案
参考:
https://www.lab-z.com/stu136/
在编译器选项中加入/FAcs,之后重新编译,可以得到汇编代码cod文件
打开之后搜索memset,即可定位到源代码出问题的行数
之所出现这种问题,是因为编译器进行了自动优化,把你的填充内存的代码优化成了memset函数,这时候只需要使用/Od选项,关闭优化即可
这篇关于error LNK2001: unresolved external symbol memset的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!