Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do I install both mingw32 and mingw64 on Linux or MacOS?

I'm having trouble installing both mingw32 and mingw64 on Linux or MacOS. I've tried many different package repositories and multiple versions of Linux. I'm happy to use anything.

Thanks.

like image 230
vy32 Avatar asked Feb 24 '23 15:02

vy32


2 Answers

On Ubuntu, you can get going in many cases with "apt-get install gcc-mingw32"

If you need to install both the 64-bit and 32-bit mingw compilers, try this:

  • from http://sourceforge.net/tracker/?func=detail&aid=3258887&group_id=67079&atid=516781

For 64-bit build systems:

apt-get install libmpfr1ldbl
wget http://ppa.launchpad.net/mingw-packages/ppa/ubuntu/pool/main/w/w64-toolchain/x86-64-w64-mingw32-toolchain_1.0b+201011211643-0w2273g93970b22426p16~karmic1_amd64.deb
dpkg -i x86-64-w64-mingw32-toolchain_1.0b+201011211643-0w2273g93970b22426p16~karmic1_amd64.deb

For 32-bit build systems:

wget http://ppa.launchpad.net/mingw-packages/ppa/ubuntu/pool/main/w/w64-toolchain/i686-w64-mingw32-toolchain_1.0b+201011211643-0w2273g93970b22426p16~karmic1_amd64.deb
dpkg -i i686-w64-mingw32-toolchain_1.0b+201011211643-0w2273g93970b22426p16~karmic1_amd64.deb

Source for this tip: http://ubuntuforums.org/showthread.php?t=1705566

On Fedora, you can install mingw32 using standard yum. To install mingw64, follow the instructions at:

  • http://fedoraproject.org/wiki/MinGW/CrossCompilerFramework
  • http://fedoraproject.org/wiki/Features/Mingw-w64_cross_compiler
  • http://www.advancedhpc.com/tower_servers/tower_server_products.html

    $ cd /etc/yum.repos.d $ sudo wget http://fedoraproject.org/wiki/MinGW/CrossCompilerFramework#Development_and_testing_repository $ yum update $ yum install mingw64-gcc mingw64-g++ mingw64-zlib

Best bet for cross-compiling seems to be Fedora, which gives you both mingw32 and mingw64:

  • http://fedoraproject.org/wiki/MinGW/CrossCompilerFramework

    sudo yum install mingw32-gcc-c++

I haven't been able to find a 64-bit cross-compiler for Mac.

like image 146
vy32 Avatar answered Apr 01 '23 22:04

vy32


Fedora has a very nice mingw32 cross compiler framework with lots of pre-compiled libraries. The packages are all included in the official package repository and it's just the matter of running 'yum install mingw32-gcc' to set the compiler up. See the Fedora MinGW project page for more information.

However, the official packages currently only support the 32 bit Windows target. To lift that restriction, there is work underway and a temporary repository set up with mingw32, mingw64, and OS X cross compilers. See https://fedoraproject.org/wiki/MinGW/CrossCompilerFramework for more info.

like image 30
kalev Avatar answered Apr 01 '23 20:04

kalev