找不到stdafx.h中包含的头文件

Header files included in stdafx.h are not found

本文关键字:文件 包含 stdafx 找不到      更新时间:2023-10-16

我正在使用visual studio 2008。我在stdafx.h中包含了一些include (boost头),但是,现在编译器找不到它们(例如lexical_cast找不到)。我在cpp文件的顶部包含了stdafx.h。我做错了什么?

提前感谢

edit::我已经正确设置了包含路径,如果我直接在CPP文件中包含boost头,一切都有效。

进入:

Menu -> Tools -> Options -> unwind Project and Solutions -> vc++ Directories -> "Show Directories for:" -> choose Include files -> Add path to your Boost directory