且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

可以使用 Mingw 构建 Windows 应用商店应用程序吗?

更新时间:2022-12-21 08:34:12

您需要使用 Windows 运行时 C++ 模板库 (WRL) 直接,您将无法使用 C++/CX 因为 Mingw 不支持它.除此之外,我认为您只需要 Windows 8 SDK,然后您需要配置 Mingw 以使用头文件和库.此外,您将无法使用 XAML 来描述您的用户界面,您必须手动创建您的 UI在代码中.

You would need to use the Windows Runtime C++ Template Library (WRL) directly, you wouldn't be able to use C++/CX as Mingw doesn't support it. Other than that, I think you just need the Windows 8 SDK, then you need to configure Mingw to use the headers and libraries. Also, you won't be able to use XAML to describe your user interface, you'll have to manually create your UI in code.

与其尝试使用 mingw 编写整个应用程序并使用 linux 进行交叉编译,不如使用 mingw 编写核心库,然后使用 Visual Studio Express(免费)在库上编写一个简单的 UI 包装器.这样你就可以使用所有的好东西,比如 XAML 和引用计数实例.

Rather than attempt to write the entire application with mingw and cross compile it with linux, you can write your core libraries with mingw, then write a simple UI wrapper over the libraries using Visual Studio Express (free). That way you can use all the nice stuff like XAML and ref-counted instances.

这是我采用的方法 - 使用用 C++ 编写的库,然后使用引用其他库的单独 UI 项目(使用 XAML).效果很好.

This is the approach I have taken - using libraries written in C++, and then a separate UI project (using XAML) which references the other libraries. It works well.