我有一个用 C++ 编写的项目,它将 LaTeX 公式转换为.gif
图像,我想将此项目用作我的 C# Windows Store 应用程序中的组件。
我怎样才能做到这一点?
我读了但不明白。如果它是全局的,那么简单的任务呢?这简单吗?
我使用本文中的 Mathtex
我有一个用 C++ 编写的项目,它将 LaTeX 公式转换为.gif
图像,我想将此项目用作我的 C# Windows Store 应用程序中的组件。
我怎样才能做到这一点?
我读了但不明白。如果它是全局的,那么简单的任务呢?这简单吗?
我使用本文中的 Mathtex
It's pretty easy, just create the C++ project as a Windows Runtime Component project or something similar, build it, and add it as a reference from the C# project.
Remember that you need to use C++/CX in order to create classes that can be consumed from C# in a Windows Store app. C++/CX is similar to C++/CLI (managed C++), except that C++/CX is unmanaged and for Windows Store apps, and C++/CLI is managed and for desktop apps. Either way, a normal C++ class can never be consumed from C# (unless it's a COM class, but that's a topic for another discussion).