Manual for cross-compiling a C++ application from Linux to Windows?

后端 未结 3 1890
再見小時候
再見小時候 2020-12-02 07:47

Is there a manual for cross-compiling a C++ application from Linux to Windows?

Just that. I would like some information (links, reference, examples...) to guide me t

3条回答
  •  失恋的感觉
    2020-12-02 08:32

    It depends on what you mean (I couldn't really say).

    1. If you mean that you want to use an existing Linux application on Windows, then you could try compiling it using Cygwin on Windows. This however does not give you a Windows executable free from all dependencies towards Cygwin (your executable still depends on the cygwin.dll file) - and it still may need some porting before it will work. See http://www.cygwin.com.

    2. If you mean that you want to be able to perform the actual compilation of a Windows application on Linux and produce a .exe file that is executable on Windows - thus using your Linux box for development and/or compilation then you should look into MinGW for Linux which is a tool for crosscompiling for Windows on Linux. See http://www.mingw.org/wiki/LinuxCrossMinGW.

    Best regards!

提交回复
热议问题