How to compile executable for Windows with GCC with Linux Subsystem?

前端 未结 2 1638
傲寒
傲寒 2020-12-04 07:20

Windows 10 Anniversary Update includes the Linux Subsystem for Ubuntu. I installed gcc with sudo apt-get install gcc.

I wrote some simple C code for tes

2条回答
  •  不思量自难忘°
    2020-12-04 07:22

    If you compile using gcc on linux it will produce an ELF file not a PE (what windows understand) file

    To compile a program for windows inside linux you can use mingw.

提交回复
热议问题