可以使用 Mingw 构建 Windows 应用商店应用程序吗? [英] Can Windows Store applications be built with Mingw?

查看:41
本文介绍了可以使用 Mingw 构建 Windows 应用商店应用程序吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法使用 Mingw 工具链构建 Windows 应用商店应用程序?(最终从 Linux 上的 mingw 交叉编译它们,因为如果它在一个 Mingw 工具链中工作,它应该在另一个工具链中工作.)

Is there a way to build Windows Store applications with the Mingw toolchain? (And ultimately cross compile them from mingw on Linux, since if it works in one Mingw toolchain it should work in another.)

我想一个要求是坚持API:s allowed 在 Windows 应用商店应用沙箱中,但是在分发到商店之前还有哪些其他事项需要考虑?XAML?32 位还是 64 位代码?

I guess one requirement is to stick to the API:s allowed in the Windows Store app sandbox, but what other things are there to consider before distribution to the store? XAML? 32 or 64 bit code?

由于 Mingw C++ 与 MSVC++ 的链接不兼容,我假设没有 WRL 是实现这一目标的最简单方法吗?

Since Mingw C++ is not link compatible with MSVC++, I assume plain C programs without WRL would be the easiest way to achieve this?

推荐答案

您需要使用 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.

这篇关于可以使用 Mingw 构建 Windows 应用商店应用程序吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆