Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在这个 cpp 文件中,我只包含这些头文件
#include <D3D11.h> #include <d2d1.h> #include <d2d1_1.h> #include <DXGI1_2.h> #include <wincodec.h> #include <wincodecsdk.h> #include <D2d1helper.h> #include <Shcore.h>
wrl.h 在哪里?或者有这个选项吗?
您可以添加编译器选项 /showIncludes 来确定包含 wrl.h 的位置。在构建期间,这将向您显示一个空格缩进的树视图,其中包含哪些文件包括哪些其他文件。确保进行重建,而不仅仅是增量构建,因为额外的包含可能来自您的 pch。
如果包含位于顶层,您可能会检查其他编译器选项,以查看是否有东西使用 /FI 在命令行中包含文件。
(作为记录,我只尝试了上面的头文件和 Win8 上的 VS 2012,但我没有看到 wrl.h 被包含在内。所以该头文件必须被其他东西包含。)