<legend id='v6PdN'><style id='v6PdN'><dir id='v6PdN'><q id='v6PdN'></q></dir></style></legend>
      • <bdo id='v6PdN'></bdo><ul id='v6PdN'></ul>

      1. <i id='v6PdN'><tr id='v6PdN'><dt id='v6PdN'><q id='v6PdN'><span id='v6PdN'><b id='v6PdN'><form id='v6PdN'><ins id='v6PdN'></ins><ul id='v6PdN'></ul><sub id='v6PdN'></sub></form><legend id='v6PdN'></legend><bdo id='v6PdN'><pre id='v6PdN'><center id='v6PdN'></center></pre></bdo></b><th id='v6PdN'></th></span></q></dt></tr></i><div id='v6PdN'><tfoot id='v6PdN'></tfoot><dl id='v6PdN'><fieldset id='v6PdN'></fieldset></dl></div>
      2. <tfoot id='v6PdN'></tfoot>

        <small id='v6PdN'></small><noframes id='v6PdN'>

        如何使用 gcc/g++ 在 Linux 上为 Windows 编译?

        时间:2023-09-19
        <i id='zDLP1'><tr id='zDLP1'><dt id='zDLP1'><q id='zDLP1'><span id='zDLP1'><b id='zDLP1'><form id='zDLP1'><ins id='zDLP1'></ins><ul id='zDLP1'></ul><sub id='zDLP1'></sub></form><legend id='zDLP1'></legend><bdo id='zDLP1'><pre id='zDLP1'><center id='zDLP1'></center></pre></bdo></b><th id='zDLP1'></th></span></q></dt></tr></i><div id='zDLP1'><tfoot id='zDLP1'></tfoot><dl id='zDLP1'><fieldset id='zDLP1'></fieldset></dl></div>

          <small id='zDLP1'></small><noframes id='zDLP1'>

          • <bdo id='zDLP1'></bdo><ul id='zDLP1'></ul>
              <tbody id='zDLP1'></tbody>

          • <legend id='zDLP1'><style id='zDLP1'><dir id='zDLP1'><q id='zDLP1'></q></dir></style></legend>

              <tfoot id='zDLP1'></tfoot>

                  本文介绍了如何使用 gcc/g++ 在 Linux 上为 Windows 编译?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我在 Linux 上使用 freeglut 在 C++ (g++) 中编写了一些效果,并使用

                  I have written some effects in C++ (g++) using freeglut on Linux, and I compile them with

                  g++ -Wall -lglut part8.cpp -o part8
                  

                  所以我想知道是否有可能让 g++ 生成包含所需一切的静态编译 Windows 可执行文件?

                  So I was wondering if it is possible to have g++ make static compiled Windows executables that contains everything needed?

                  我没有 Windows,所以如果我能在 Linux 上做到这一点,那就太酷了 :)

                  I don't have Windows, so it would be really cool, if I could do that on Linux :)

                  推荐答案

                  mingw32 作为 Linux 的一个包存在.您可以使用它交叉编译和链接 Windows 应用程序.在 Code::Blocks 论坛上有一个教程.例如,请注意命令更改为 x86_64-w64-mingw32-gcc-win32.

                  mingw32 exists as a package for Linux. You can cross-compile and -link Windows applications with it. There's a tutorial here at the Code::Blocks forum. Mind that the command changes to x86_64-w64-mingw32-gcc-win32, for example.

                  例如,Ubuntu 的存储库中有 MinGW:

                  Ubuntu, for example, has MinGW in its repositories:

                  $ apt-cache search mingw
                  [...]
                  g++-mingw-w64 - GNU C++ compiler for MinGW-w64
                  gcc-mingw-w64 - GNU C compiler for MinGW-w64
                  mingw-w64 - Development environment targeting 32- and 64-bit Windows
                  [...]
                  

                  这篇关于如何使用 gcc/g++ 在 Linux 上为 Windows 编译?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:为什么 std::cout 输出在发送 NULL 后完全消失 下一篇:构造函数符号的双重发射

                  相关文章

                  最新文章

                  <legend id='Rur7a'><style id='Rur7a'><dir id='Rur7a'><q id='Rur7a'></q></dir></style></legend>
                1. <i id='Rur7a'><tr id='Rur7a'><dt id='Rur7a'><q id='Rur7a'><span id='Rur7a'><b id='Rur7a'><form id='Rur7a'><ins id='Rur7a'></ins><ul id='Rur7a'></ul><sub id='Rur7a'></sub></form><legend id='Rur7a'></legend><bdo id='Rur7a'><pre id='Rur7a'><center id='Rur7a'></center></pre></bdo></b><th id='Rur7a'></th></span></q></dt></tr></i><div id='Rur7a'><tfoot id='Rur7a'></tfoot><dl id='Rur7a'><fieldset id='Rur7a'></fieldset></dl></div>

                    <small id='Rur7a'></small><noframes id='Rur7a'>

                      <bdo id='Rur7a'></bdo><ul id='Rur7a'></ul>

                    <tfoot id='Rur7a'></tfoot>