Documente Academic
Documente Profesional
Documente Cultură
Aberdeen
Where professionals meet would-be
professionals
or for a 64 Bit environment? A GCC porting can be done in different ways, e.g., by creating a complete UNIX
environment layer on Windows (the approach taken by the Cigwin developers) or
Extras for the ideal degree
by creating a minimalist development environment to compile native Microsoft
Be a creative thinker for job
Windows applications. The latter approach, which allows programmers to
security
generate Windows executables directly using a GCC toolchain, goes under the
Entrepreneurship degree cancelled name of MinGW (Minimalist GNU for Windows). This is the approach we use, as it
Being an entrepreneurial student allows us to compile and run C/C++/Fortran/Go applications under Windows
directly, both for development and for production purposes. In many cases, a
GCC-compiled program built for Windows can be then ported to Linux with
CATEGORIES minor changes, if any.
development Follow
events
MinGW in general
hackday
masters programme
MinGW is a minimalist UNIX layer that allows to use GNU applications from
service design within MS Windows. Differently from other environments such as Cygwin,
software factory MinGW provides a complete Open Source programming toolset for the
software technologies development of native MS Windows applications which do not depend on any
third-party C-Runtime DLLs. In other words, source code compiled and linked
start up tools
using a MinGW GCC toolchain is a true native executable that runs under MS
startup events
Windows directly, without the need for any extra software acting as a wrapper. A
startups MinGW release includes:
Uncategorized
working world 1. A port of the GNU Compiler Collection (GCC), which provides, at the time of
writing, compilers for C, C++, Objective C, Objective C++, Fortran, Java, Ada,
and Go. MinGW compilers provide access to the functionality of the
@ABZ_SOFT_ENT Microsoft C runtime and some language-specific runtimes.
My Tweets 2. GNU binary utils for Windows (i.e., assembler, linker, archive manager).
As part of the GCC compilation and linkage toolchain, MinGW often uses tools
RECENT COMMENTS from the MSYS2 distribution. MSYS2, which is a contraction of Minimal SYStem
The startup is the c… on version 2, is a Bourne Shell command line interpreter offered as an alternative to
GSJ and NHTG event in
March
Microsoft’s cmd.exe. MSYS provides a general purpose command line
Another Weekend of F… environment used in conjunction with MinGW to port many Open Source
on Build a happy startup
applications to the MS-Windows platform. MSYS2 is a light-weight fork of Cygwin
that includes a small selection of Unix tools chosen to facilitate the porting
objective. The version of make distributed with MSYS2 is a typical tool used in the
ARCHIVES MinGW GCC toolchain (in place of MinGW’s own version of make).
January 2016
December 2015 There are basically two different “strains” of MinGW releases:
November 2015
The MinGW release from the MinGW project, the original project that only
March 2015
supports a 32 bit software architecture (both as host and target) for the GCC.
February 2015 This means that such MinGW release (also known as MinGW-W32) only
October 2014 works on 32 bit Windows versions and generates executables that only run
August 2014 on 32 bit Windows versions.
July 2014 The MinGW suite of releases from the MinGW-W64 project, which supports
both 64 bit and 32 bit GCC versions. MinGW-W64 also supports a much
June 2014
larger part of the Windows API. More specifically, MinGW-W64 releases
May 2014
cross compilers that allow the creation of executables and DLLs targeting 64
April 2014 bit architectures (HW: x86_64; SW:Win64) and 32 bit architectures (HW: i686;
March 2014 SW: Win32). This is done using a host architecture that can be either
February 2014 x86_64:Win64 or i686:Win32.
January 2014
Note that while you can have a Win32 version running on x86_64 hardware, you
December 2013
can’t have a Win64 version running on i686 hardware. Notably, these days a
November 2013
computer running a Win32 version is likely to be an old machine with a 32 bit i686
October 2013 hardware architecture rather than one with an x86_64 HW architecture.
Comments RSS
MinGW-W64: what to install
WordPress.com
The starting point for the download and installation of MinGW-W64 is the
download page of the MinGW-W64 project website. This page presents a list of
pre-built toolchains and packages that could be a bit confusing for the newcomer.
However, things are quite simple in reality, keeping in mind that the objective of
the MinGW-W64 project is that of prividing toolchains that target Windows (i.e.,
that generate executables for Windows) using the GCC on a variety of hosts (i.e.,
of operating systems). So, if you want to use a GCC toolchain on a Windows
machine to generate Windows executables, you must pick up a MinGW-W64
binary distribution where the host is Windows. In practice, this means focusing
on the package called mingw-builds. At the time of writing, the relevant section of
the download page looks like this:
The actual version number could be higher, indicating a newer release, but the
download page outlook should by and large be the same. Clicking on the Mingw-
builds link will lead you to a Sourceforge download page where you will be able to
get the latest version of the MinGW-W64 installer for Windows.
You will also need to download and install MSYS to use some of its features as
part of the GCC toolchain. The MinGW-W64 project provides an updated version
of the MSYS package called Msys2. Clicking on the Msys2 link on the MinGW-W64
download page (see above) will lead you to a GitHub download page. Get the
x86_64 version of Msys2 rather than the i686 one if – as expected – you have an
x86_64 machine running Win64.
The default initial setup proposed by the installer – You will need to modify
some installation parameters as explained below
Version: always select the latest one from the drop-down menu (i.e., the one
suggested by default) unless you have a very specific reason to do otherwise
(e.g., the latest version has a known bug that affects library XYZ, so there is a
need to revert back to a previous, safe version).
Architecture: Select x86_64 in place of i686.
Threads: POSIX threads are fine, leave that setting.
Exception mechanism: select sjlj (short jump – long jump).
Build revision: always select the latest one from the drop-down menu (i.e.,
the one suggested by default) unless you have a very specific reason to do
otherwise.
Your settings page should then become something like this (possibly showing a
newer version, but keeping all the rest as in the picture):
The initial installation directory proposed by the installer – you are suggested
to change it as discussed below.
Installing the chosen mingw release in a directory that explicitly specifies its
version, architecture, threads model, expection mechanism, etc. (i.e., its specific
characteristics) allows the installation of mingw versiosn with different
characteristics and thus a rapid swap between them. This can be achieved by
simply repointing the environment variables to a different root directory, as
discussed later.
Rather than installing MinGW (plus MSYS2 and any other software to be
compiled using the MinGW-based GCC toolchain like OpenCV) in the usual
C:\Program Files directory, it would be better to create a
C:\Program_Files directory and install everything there. The reason for this
choice is simple: Avoid blank spaces in directory paths and file names if at all
possible when dealing with MinGW-related stuff. The GCC toolchain did (and in
some cases may still do) work incorrectly with paths and file names including
blank spaces. besides, you will have a chance to group all GCC-related files in a
specific directory that would be easier to standardis and manage.
In this way, the Windows Path environment variable would be updated by adding
the %MINGW_HOME%\bin directory, i.e.
Path = ;%MINGW_HOME%\bin;
This can be done in all Windows version. However, Windows 10 (if installed from
scratch rather than updated from Win7 or Win8) provides a better GUI to manage
environmnt variables. Using an environment variable to specify the path allows
programmers to rapidly switch between different MinGW-W64 versions if needed.
In fact, different versions (e.e., a 32 bit and a 64 bit one) could be deployed in
parallel in the same root directory (e.g., C:\Program_Files\mingw-w64). To
swap between different MinGW versions, it would be enough to modify the value
of the MINGW_HOME environment variable, letting it point to a different
MinGW_W64 version. In theory, this process could be even automated using
batch commands.
Run the MSYS2 installer downloaded from the MSYS2 distribution, called msys2-
x86_64-20150916.exe or something similar, where the meaning of the various
installer name components is self-evident. Follow the installation instructions
provided in the MSYS2 download page (whose salient points will be summarised
in the following).
Once you begin the installation procedure, you will see a startup page like this:
It is recommended to deploy MSYS2 alongside the very same root directory with
no blank spaces where MinGW-W64 resides, i.e.,
At the end of the installation process, the following window will appear:
The final Msys2 installer window: “Run msys2 64 bit now” and go
Just to double-check that the window in front of you is the MSYS2 UNIX shell
rather than the Windows command prompt, enter the UNIX command pwd (print
working directory). If you are in the right shell, you will see thewhere you are in
terms of the MSYS2 UNIX environment sitting on top of Windows. Typically, you
will be in the directory /home/. The use of forward slashes (i.e., /) in place of back
slashes is the very indication that you actually are in a UNIX environment rather
than in the Windows environment.
To do so, carefully follow the instruction provided in the MSYS2 download page,
which are summarised as follows.
pacman -S make
C:\Program_Files\msys2\msys2-x86_64-20160921\usr\bin
Share this:
Like
Blog at WordPress.com.