Home > database >  How to link mingw compiler installed on windows 10 to ubuntu 20.04 terminal?
How to link mingw compiler installed on windows 10 to ubuntu 20.04 terminal?

Time:11-22

I am using ubuntu 20.04 terminal on windows 10. I have installed mingw compiler on windows and now I want to link that to my ubuntu terminal. Can you please help me how to do that?

CodePudding user response:

If you have a Windows version of MinGW then you should use that in Windows.

For Ubuntu you will need a Linux version of MinGW. You should be able to install it in Ubuntu from the Linux shell with:

su aptitude install mingw-w64

But note that MinGW generates files to be run on Windows. If you intend to compile stuff intended to also run on Ubuntu, then you should just use native gcc as installed with:

su aptitude install gcc
  • Related