How To Download And Install Mingw W64

4 views
Skip to first unread message

Sheron Kernan

unread,
Jul 21, 2024, 10:42:13 PM7/21/24
to AAEON - Computing Platform Service Partner

In this tutorial, you configure Visual Studio Code to use the GCC C++ compiler (g++) and GDB debugger from mingw-w64 to create programs that run on Windows. After configuring VS Code, you will compile, run, and debug a Hello World program.

how to download and install mingw w64


Downloadhttps://urlca.com/2zzuIK



Remember, the C++ extension uses the C++ compiler you have installed on your machine to build your program. Make sure you have completed the "Installing the MinGW-w64 toolchain" step before attempting to run and debug helloworld.cpp in VS Code.

If you have Visual Studio or WSL installed, you might need to change compilerPath to match the preferred compiler for your project. For example, if you installed MinGW-w64 version 8.1.0 using the i686 architecture, Win32 threading, and sjlj exception handling install options, the path would look like this: C:\Program Files (x86)\mingw-w64\i686-8.1.0-win32-sjlj-rt_v6-rev0\mingw64\bin\g++.exe.

You must follow the steps on the MSYS2 website to use the MSYS CLI to install the full MinGW-w64 toolchain(pacman -S --needed base-devel mingw-w64-ucrt-x86_64-toolchain), as well as all required prerequisites. The toolchain includes g++ and gdb.

Mingw-w64 is an advancement of the original mingw.org project, created tosupport the GCC compiler on Windows systems. It has forked it in 2007 in orderto provide support for 64 bits and new APIs. It has since then gained widespreaduse and distribution.

You should install it either into C:\MinGW or C:\MinGW\pdcurses. You want the libraries and h files to install into /mingw/lib/ and /mingw/include/You will probably need to do ln -s /mingw/include/libpdcurses.a /mingw/include/libcurses.a.

Unfortunately, the MinGW-w64 installer you used sometimes has this issue. I myself am not sure about why this happens (I think it has something to do with Sourceforge URL redirection or whatever that the installer currently can't handle properly enough).

Make sure any compilers and libraries you install have this package prefix: mingw-w64-ucrt-x86_64-. Only use unprefixed packages for misc command-line utilities (such as grep, sed, make, etc), unless you know what you're doing.

You can now also get the stand-alone personal build of MinGW-w64 from which doesn't require any installation; just extract and its ready to use. This allow having multiple toolchains on the same system (e.g., one for Windows 32-bit and another for Windows 64-bit).

I tried to install MinGW-w64, downloaded it from sourceforge.net and followed instructions from so many youtube videos and all said to add bin folder to the path... I don't see any kind of folders like this, then I downloaded and tried to install the mingw-64-install.exe but while installing it always says "The file downloaded incorrectly" then I tried it with other downloaded intall.exe files but still the sam... Now i ran out of ideas what to do! PleasE HALP

As you can see, if you need other mingw64 builds of programs (toolchain programs or not), their package names would be prefixed with mingw-w64-x86_64-. There's also the package group mingw-w64-x86_64-toolchain which you can pacman -S --needed instead to get a somewhat full toolchain.

I also tried sudo yum --enablerepo=extras install epel-release since that was suggested in some posts but that also failed. I don't know what this is, but I suspect that just installs EPEL 7, which I have already done.

I am not completly sure what that does or where it places the TBB lib. It is promising and will look into it. But that will only come in handy for 2.24 as 2.23 will fail to build if not using mingw32-make.

And, I don't have the gmake command (yet I have installed minGW). When I use something like "mingw32-make" in the directory of these files I have the message "No targets specified and no makefile found".

tbb22_20090809oss_src.tgz is good package to use. you need to change dir to the unpacked archive. there you should see Makefile, COPYING and other files and folders. there you need to invoke mingw32-make. and make sure that mingw32-make has version 3.81 by launching 'mingw32-make -v' command.

It's ok now, I have all the files. But, (I hope a last question), I ran the command "mingw32-make", and, how can I say that, it seems to be running for 30min now, and nothing appears on my DOS console. Is it normal that it takes so much time ?

But now, when I add to the command line 'runtime=mingw' nothing happens at all. It seems to be on stand by, as described before... Maybe does it come from a environment variable or something like this ?

In this article, we'll go through the installation and basic usage of MinGW-w64 on Kali Linux to compile local exploit code. The MinGW-w64 project is a complete runtime environment for GCC (GNU Compiler Collection) to support binaries native to Windows 64-bit and 32-bit operating systems.

First, we will need a root shell. Kali Linux defaults to a single root user on install. If you have made no changes to the system, you already have a root shell when you open your terminal! In my case, I will be using SSH to connect to my headless Kali system.

Since this code is for 64-bit machines, we use the 64-bit version of the cross compiler. MinGW comes with quite a few options for cross-compilation. In order to see a list of available compilers installed with the MinGW package, enter the following command.

Mingw-w64 is an advancement of the original mingw.org project, created to support the GCC compiler on Windows systems. It has forked it in 2007 in order to provide support for 64 bits and new APIs. It has since then gained widespread use and distribution.

The installer I downloaded from OpenCV's site had only a 'x64' folder. I use an i686 system. I want to build my libraries (don't know how) using GCC 6.2.0. If you could help me, it'd be cool of you. : D

Here's the steps I followed...1. Extracted the OpenCV files to "C:/".2. Used CMake to configure and generate install files in another folder (named it "opencv-mingw").3. Went to that folder using CMD,used the "mingw32-make" and "mingw32-make install" commands.

I actually rage quit by deleting directory where I installed the files. So, right now, I'm rebuilding them. But I think I remember seeing a "opencv_world320.dll.a". So, in any of my further projects, Do I just link to that library, and that's it?

Considering the general complexity of what is being installed, the installation is amazingly simple. You download an installer which works much like the Linux Synaptic Manager. From there you select which parts of MinGW you want to install.

Once started, I selected the default options (installing into c:\MinGW). Once the installer is setup, it asks which parts of MinGW you want to install. I selected mingw32-base (gcc), and msys-base (bash + utilities):

Most MinGW installations, however, include much more than just a compiler. Most distributions of MinGW include a whole host of other tools that can be used to build and assemble software on Windows using the familiar GNU toolset. MinGW build environments often contain an entire POSIX development environment that can be used to develop both native Windows software using POSIX build tools and POSIX software that runs on Windows with the help of an emulation layer.

Please download the preview and try out the latest C++ features. You will need to also make sure you install the Linux Tools for C++ workload in addition to Desktop C++ to use these new features. You can learn more about Open Folder on the Microsoft docs site. We are looking forward to your feedback.

Getting started with MinGW is simple once you have installed the latest Visual Studio Preview. First, you will need to make sure that you select the C++ workload when you install Visual Studio. Next, you will need to download MinGW itself. There are actually many ways to install MinGW. If you are particularly adventurous you can build it from source, but it is much easier to install any of the popular binary distributions. One of the more popular distributions is MSYS2 (getting started guide). A standard MSYS2 installation installs three build environments: POSIX build environments to natively target 32-bit and 64-bit Windows, and an emulation layer to build POSIX software that targets Windows.

If you have a particular project in mind that you are working with, it is also worth checking out if they have any project-specific instructions on how to install MinGW. Some projects even include their own custom tailored MinGW distributions.

To try out the latest and greatest C++ features and give us some early feedback, please download and install the latest Visual Studio 2017 Preview. As always, we welcome your feedback. Feel free to send any comments through e-mail at visu...@microsoft.com, through Twitter @visualc, or Facebook at Microsoft Visual Cpp.

If you encounter other problems with Visual Studio 2017 please let us know via Report a Problem, which is available in both the installer and the IDE itself. For suggestions, let us know through UserVoice. We look forward to your feedback!

As of Fedora 17 it is possible to easily build (cross-compile) binariesfor the win32 and win64 targets. This is realized using the mingw-w64toolchain: -w64.sf.net/. Using this toolchain allows you tobuild binaries for the following programming languages: C, C++,Objective-C, Objective-C++ and Fortran.

Once you've installed one (or more) of these packages you should have anew folder on your filesystemcalled /usr/i686-w64-mingw32/sys-root/mingw (for win32)or /usr/x86_64-w64-mingw32/sys-root/mingw (for win64). These folderscontain various pieces belonging to the mingw-w64 toolchain, for examplethe headers belonging to the Windows API and the import libraries forthe default Windows API libraries (like shell32.dll and winsock2.dll).

Most open source projects are using the autoconf infrastructure(./configure; make; make install). This type of projects can be builtvery easily for the win32 or win64 targets. Just install one of thecompiler packages mentioned earlier and replace ./configure with either'mingw32-configure' or 'mingw64-configure' (depending whether you wantto build for the win32 or the win64 target). The mingw32-configure andmingw64-configure scripts are helper scripts which automatically callthe ./configure script with the correct environment set

760c119bf3
Reply all
Reply to author
Forward
0 new messages