unexpected end of file while looking for precompiled header.
unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
因为建立工程的时候设置生成dll库,默认给了预编译头stdafx。
右键该工程,选择工程属性。
然后在C/C++ -> Precompiled Header -> Precompiled Header选择不使用预编译头。如果没有该选项,就先把预编译头删了,然后关掉对话框,重新打开工程属性,就可以了。