Linux environment in Windows
msys2.org
(and may be http://mingw-w64.org)
and after installing:
-
Download MSYS2 from this page (choose 32 or 64-bit according to what version of Windows you are going to use it on, not what kind of executables you want to build, both versions can build both 32 and 64-bit binaries).
-
After the install completes, click on the newly created "MSYS2 Shell" option under either
MSYS2 64-bit
orMSYS2 32-bit
in the Start menu. Update MSYS2 according to the wiki (although I just do apacman -Syu
, ignore all errors and close the window and open a new one, this is not recommended and you should do what the wiki page says). -
Install a toolchain
a) for 32-bit:
pacman -S mingw-w64-i686-gcc
b) for 64-bit:
pacman -S mingw-w64-x86_64-gcc (or pacman -S mingw-w64-x86_64-toolchain and select what to install)
-
install any libraries/tools you may need. You can search the repositories by doing
pacman -Ss name_of_something_i_want_to_install
e.g.
pacman -Ss gsl
and install using
pacman -S package_name_of_something_i_want_to_install
e.g.
pacman -S mingw-w64-x86_64-gsl
and from then on the GSL library is automatically found by your MinGW-w64 64-bit compiler!
-
Open a MinGW-w64 shell:
a) To build 32-bit things, open the "MinGW-w64 32-bit Shell"
b) To build 64-bit things, open the "MinGW-w64 64-bit Shell"
-
Verify that the compiler is working by doing
gcc -v
- pacman -S diffutils (it is used when wxWidgets installing)
- You may also need
make
, runpacman -S make
optionally install cmake: pacman -S mingw-w64-x86_64-cmake
And may be this is need: pacman -S mingw-w64-x86_64-make (it will be /mingw64/bin/mingw32-make.exe)
from here