[UWP] [C ++] pch.h在哪里?

人气:317 发布:2022-09-22 标签: wpdevelop

问题描述

我正在学习本教程。在过程8中(在您的UWP应用程序的pch.h文件中包含库的头文件。) 这是我拥有的,在UWPApps下没有pch.h。我应该自己创建它,如果我应该放在哪里? https://imgur.com/a/pwonHfc

I'm following this tutorial. In procedure 8 (Include the library's header file(s) in your UWP app's pch.h file.) Here is what I have, no pch.h under UWPApps. Should I create it by myself if yes where should I place it? https://imgur.com/a/pwonHfc

并且不是c ++的pch.ha头文件,c#也可以这样做吗?

And isn'tpch.h a header file for c++, Can c# also do this?

已解决。

有否NBSP; pch.h。对于c#,只需使用 DllImport,对于DLL文件,添加 extern"C" {method}

There is nopch.h. For c# just useDllImport and for DLL file addextern "C"{method}

推荐答案

Pch .h是Visual C ++项目中使用的预编译头。它(也没有其他C ++头文件)不在C#项目中使用。有关预编译头的更多信息,请参阅https://docs.microsoft.com/en-us/cpp/build/reference/creating-precompiled-header-files?view=vs-2017 Pch.h is a precompiled header used in Visual C++ projects. It (nor other C++ header files) is not used in C# projects. For more info on precompiled headers see https://docs.microsoft.com/en-us/cpp/build/reference/creating-precompiled-header-files?view=vs-2017

231