5

I would like to compile some C programs for Windows. So I used a search engine and I found that I probably need to install mingw32.

If I run:

sudo apt-get install mingw32

and I got:

E: Unable to locate package mingw32

So, I used a search engine again, and I found this answer on AskUbuntu and this answer on StackOverflow.

I ran:

sudo add-apt-repository universe

and:

sudo apt-get update

But I still the same error. What can I do to solve it?

11

On modern Debian derivatives, including Mint, mingw32 is no longer available; it has been replaced by mingw-w64:

sudo apt install mingw-w64

should work.

This package provides both 32- and 64-bit Windows compilers. When switching from mingw32 to mingw-w64, you’ll need to adjust the target triplets:

  • i686-w64-mingw32 for 32-bit Windows;
  • x86_64-w64-mingw32 for 64-bit Windows.
0

Not the answer you're looking for? Browse other questions tagged or ask your own question.