MinGW在linux上交叉编译 [英] MinGW cross compiling on linux
问题描述
我有一个项目,我想为Windows编译。我有适当的makefile,一切工作与g ++。我运行 apt-get install mingw32
,下载了一个100-ish MB包,但我不知道如何实际运行它。没有 mingw32
可执行文件,也不能在互联网上找到任何帮助,那么如何实际编译呢?
I have a project which I want to compile for Windows. I have the appropriate makefile, everything works with g++. I ran apt-get install mingw32
, downloaded a 100-ish MB package, but I cannot find out how to actually run it. There is no mingw32
executable nor can I find any help on the internet, so how do I actually compile with it?
推荐答案
如果你看到 dpkg -L mingw32
的输出,你可以看到包包含一个工具链, (编译器,链接器等)。
If you see the ouput of dpkg -L mingw32
you can see that the package contains a toolchain i.e. a set of alternative tools (compiler, linker etc) useful to compile your code in another system.
你必须使用 / usr / bin / i586-mingw32msvc-g ++
,以便编译您的代码。如果我记得正确存在一个变量来告诉Makefile使用这样的工具链。
You have to use /usr/bin/i586-mingw32msvc-g++
in order to compile your code. If I remember correctly exists a variable to tell the Makefile to use a toolchain like that.
这篇关于MinGW在linux上交叉编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!