两个解决办法: 增加相应的lib。具体做法参考: https://blog.csdn.net/quantum7/article/details/103928335 包含stdafx.h。新建工程都包含这个,如果不小心删除了相应代码,加上。