在Linux for Windows上构建应用程序 [英] Building an app on Linux for Windows

查看:153
本文介绍了在Linux for Windows上构建应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是编程世界的新人,我真的很高兴我已经完成了我的第一个程序。它是一个简单的C ++游戏,我在Ubuntu上的QT编程。现在我想创建包含所有必要的依赖项的可执行文件,所以程序可以运行没有QT和使用的库。

I am new in the programming world and I am really glad that I have finished building my first program. Its a simple C++ game that I programmed in QT on Ubuntu. Now I want to create executable files which contain all the neccessary dependencies, so the program can be ran without having QT and the used libraries.

我一直在阅读的问题和论坛的帖子在过去两天,但我不能让我的头围绕着这个过程。我知道,为了使程序可执行文件它必须包含所有的链接.so文件或Windows上的.dll,但我不知道如何从.so到.dll转换,以及如何将这些包括在我的程序。

I've been reading through questions and forum posts for the last two days, but I cant get my head around the process. I know that in order to make the program executable it has to contain all the links to the .so files or the .dll on windows, but I have no idea how to convert from .so to .dll and how to include those into my program.

我真的看了很多帖子,所有的看起来有点太先进。还有整个建筑,发布,包装,部署过程对我来说不清楚,但我从头开始没有找到任何正确的信息。你能指出我正确的方向吗?

I really did look at a lot of posts and all of them seemed a bit too advance. Also the whole building, releasing, packaging, deploying processes are not clear to me, but I haven't found any decent information starting from scratch.Can you point me into the right direction ?

感谢

推荐答案

我不能推荐足够的交叉编译,虚拟机与您的目标操作系统,并安装本机工具链加上任何所需的库。这更简单,更不容易出错,并且问题更容易诊断。

I can't recommend enough not cross-compiling, get a virtual machine with your target OS and install the native toolchain plus any required libraries. This is simpler, less error-prone, and issues are easier to diagnose.

还有一个巨大的优势,你可以在你正在构建的平台上测试软件。记住,你仍然需要访问你的目标操作系统,以测试你所构建的,所以在现实中,交叉编译为你没有优势。

There's also the massive advantage that you can test the software on the platform you're building on. Remember you'll still need access to your target OS in order to test what you have built, so in reality cross-compiling offers you no advantage.

如果你正在构建一个嵌入式操作系统,它的工具链是设计用于交叉编译。

Of course everything I've said is irrelevant if you're building for an embedded OS whose toolchain is designed for cross-compilation anyway.

这篇关于在Linux for Windows上构建应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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