ITK/Configuring and Building/MinGW: Difference between revisions
Daviddoria (talk | contribs) mNo edit summary |
(MinGW/Ninja instructions.) |
||
(5 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
==MSYS== | |||
To build ITK using MSYS on Windows 7, follow these instructions. | |||
Download from here: | |||
http://sourceforge.net/projects/mingw/files/latest/download?source=files | |||
or if there is a later version from the time that this page was written, download it from here: | |||
http://sourceforge.net/projects/mingw/files/Installer/ | |||
Make sure to check "C compiler", "C++ compiler", and "MinGW Developer ToolKit". | |||
You MUST add mingw to your path | |||
(Add "c:/MinGW/bin" to the "PATH" variable here: Right click my computer -> Properties -> Advanced System Settings -> Advanced -> Environment variables) | |||
You MUST add msys to your path | |||
(Add "C:\MinGW\msys\1.0\bin" to the "PATH" variable here: Right click my computer -> Properties -> Advanced System Settings -> Advanced -> Environment variables) | |||
* Launch the CMake GUI (from the normal shortcut in the Start Menu) | |||
* Next to "Where is the source code:", click "Browse Source..." and navigate to where you cloned the repository with Git. | |||
* Next to "Where to build the binaries:", select "Browse Build..." and select a place to build the ITK library. For example, you could use c:\build\ITK. This directory MUST NOT be inside the directory where you cloned the repository. | |||
* Click "Configure", and then specify "MSYS Makefiles" (NOT (MinGW Makefiles")as the generator for this project. | |||
* Choose your build options. I like to UNCHECK BUILD_EXAMPLES and BUILD_TESTING as they speed up the build process significantly. | |||
* Click "Generate". | |||
* Start a MinGW Shell (Start -> Programs -> MinGW -> MinGW Shell) | |||
* Navigate to the Build directory you specified through CMake (e.g. cd /c/build/ITK) | |||
* Run 'make' | |||
==Ninja== | |||
To build ITK using MSYS/MinGW/Ninja on Windows 7, follow these instructions. | |||
Download from here: | |||
http://sourceforge.net/projects/mingw/files/latest/download?source=files | |||
or if there is a later version from the time that this page was written, download it from here: | |||
http://sourceforge.net/projects/mingw/files/Installer/ | |||
Make sure to check "C compiler", "C++ compiler", and "MinGW Developer ToolKit". | |||
Download Ninja from here: | |||
https://github.com/martine/ninja/downloads | |||
Unzip the the zipfile. | |||
* Start a MinGW Shell (Start -> Programs -> MinGW -> MinGW Shell) | |||
* Move ''ninja.exe'' to the a location in the PATH environmental variable (e.g. mv /c/Downloads/ninja.exe /mingw/bin/) | |||
* Launch the CMake GUI from the MinGW shell (/c/Program\ Files\ \(x86\)/CMake\ 2.8/bin/cmake-gui.exe) | |||
* Next to "Where is the source code:", click "Browse Source..." and navigate to where you cloned the repository with Git. | |||
* Next to "Where to build the binaries:", select "Browse Build..." and select a place to build the ITK library. For example, you could use c:\build\ITK. This directory MUST NOT be inside the directory where you cloned the repository. | |||
* Click "Configure", and then specify "Ninja" (NOT (MinGW Makefiles")as the generator for this project. | |||
* Choose your build options. I like to UNCHECK BUILD_EXAMPLES and BUILD_TESTING as they speed up the build process significantly. | |||
* Click "Generate". | |||
* Navigate to the Build directory you specified through CMake (e.g. cd /c/build/ITK) | |||
* Run 'ninja' | |||
==MinGW== | |||
To build ITK using MinGW on Windows 7, follow these instructions. | To build ITK using MinGW on Windows 7, follow these instructions. | ||
Line 7: | Line 63: | ||
http://sourceforge.net/projects/mingw/files/Installer/ | http://sourceforge.net/projects/mingw/files/Installer/ | ||
You MUST add mingw to your path (Add "c:/MinGW/bin" to the " | Make sure to check "C compiler", "C++ compiler", and "MinGW Developer ToolKit". | ||
You MUST add mingw to your path | |||
(Add "c:/MinGW/bin" to the "PATH" variable here: Right click my computer -> Properties -> Advanced System Settings -> Advanced -> Environment variables) | |||
You MUST NOT add msys to your PATH | |||
* Launch the CMake GUI (from the normal shortcut in the Start Menu) | * Launch the CMake GUI (from the normal shortcut in the Start Menu) | ||
* Next to "Where is the source code:", click "Browse Source..." and navigate to where you cloned the repository with Git. | * Next to "Where is the source code:", click "Browse Source..." and navigate to where you cloned the repository with Git. | ||
* Next to "Where to build the binaries:", select "Browse Build..." and select a place to build the ITK library. For example, you could use c:\build\ITK. This directory MUST NOT be inside the directory where you cloned the repository. | * Next to "Where to build the binaries:", select "Browse Build..." and select a place to build the ITK library. For example, you could use c:\build\ITK. This directory MUST NOT be inside the directory where you cloned the repository. | ||
* Click "Configure", and then specify "MinGW" as the generator for this project. | * Click "Configure", and then specify "MinGW Makefiles"as the generator for this project. | ||
* Choose your build options. I like to UNCHECK BUILD_EXAMPLES and BUILD_TESTING as they speed up the build process significantly. | * Choose your build options. I like to UNCHECK BUILD_EXAMPLES and BUILD_TESTING as they speed up the build process significantly. | ||
* Click "Generate". | * Click "Generate". | ||
* Start a MinGW Shell (Start -> Programs -> MinGW -> MinGW Shell) | |||
* Navigate to the Build directory you specified through CMake | * Navigate to the Build directory you specified through CMake (e.g. cd /c/build/ITK) | ||
* Run 'mingw32-make' (note: 'make' does not seem to produce any errors, but it seems to not do anything (just returns immediately to the terminal) |
Latest revision as of 01:13, 27 September 2012
MSYS
To build ITK using MSYS on Windows 7, follow these instructions.
Download from here: http://sourceforge.net/projects/mingw/files/latest/download?source=files
or if there is a later version from the time that this page was written, download it from here: http://sourceforge.net/projects/mingw/files/Installer/
Make sure to check "C compiler", "C++ compiler", and "MinGW Developer ToolKit".
You MUST add mingw to your path (Add "c:/MinGW/bin" to the "PATH" variable here: Right click my computer -> Properties -> Advanced System Settings -> Advanced -> Environment variables)
You MUST add msys to your path (Add "C:\MinGW\msys\1.0\bin" to the "PATH" variable here: Right click my computer -> Properties -> Advanced System Settings -> Advanced -> Environment variables)
- Launch the CMake GUI (from the normal shortcut in the Start Menu)
- Next to "Where is the source code:", click "Browse Source..." and navigate to where you cloned the repository with Git.
- Next to "Where to build the binaries:", select "Browse Build..." and select a place to build the ITK library. For example, you could use c:\build\ITK. This directory MUST NOT be inside the directory where you cloned the repository.
- Click "Configure", and then specify "MSYS Makefiles" (NOT (MinGW Makefiles")as the generator for this project.
- Choose your build options. I like to UNCHECK BUILD_EXAMPLES and BUILD_TESTING as they speed up the build process significantly.
- Click "Generate".
- Start a MinGW Shell (Start -> Programs -> MinGW -> MinGW Shell)
- Navigate to the Build directory you specified through CMake (e.g. cd /c/build/ITK)
- Run 'make'
Ninja
To build ITK using MSYS/MinGW/Ninja on Windows 7, follow these instructions.
Download from here: http://sourceforge.net/projects/mingw/files/latest/download?source=files
or if there is a later version from the time that this page was written, download it from here: http://sourceforge.net/projects/mingw/files/Installer/
Make sure to check "C compiler", "C++ compiler", and "MinGW Developer ToolKit".
Download Ninja from here: https://github.com/martine/ninja/downloads Unzip the the zipfile.
- Start a MinGW Shell (Start -> Programs -> MinGW -> MinGW Shell)
- Move ninja.exe to the a location in the PATH environmental variable (e.g. mv /c/Downloads/ninja.exe /mingw/bin/)
- Launch the CMake GUI from the MinGW shell (/c/Program\ Files\ \(x86\)/CMake\ 2.8/bin/cmake-gui.exe)
- Next to "Where is the source code:", click "Browse Source..." and navigate to where you cloned the repository with Git.
- Next to "Where to build the binaries:", select "Browse Build..." and select a place to build the ITK library. For example, you could use c:\build\ITK. This directory MUST NOT be inside the directory where you cloned the repository.
- Click "Configure", and then specify "Ninja" (NOT (MinGW Makefiles")as the generator for this project.
- Choose your build options. I like to UNCHECK BUILD_EXAMPLES and BUILD_TESTING as they speed up the build process significantly.
- Click "Generate".
- Navigate to the Build directory you specified through CMake (e.g. cd /c/build/ITK)
- Run 'ninja'
MinGW
To build ITK using MinGW on Windows 7, follow these instructions.
Download from here: http://sourceforge.net/projects/mingw/files/latest/download?source=files
or if there is a later version from the time that this page was written, download it from here: http://sourceforge.net/projects/mingw/files/Installer/
Make sure to check "C compiler", "C++ compiler", and "MinGW Developer ToolKit".
You MUST add mingw to your path (Add "c:/MinGW/bin" to the "PATH" variable here: Right click my computer -> Properties -> Advanced System Settings -> Advanced -> Environment variables)
You MUST NOT add msys to your PATH
- Launch the CMake GUI (from the normal shortcut in the Start Menu)
- Next to "Where is the source code:", click "Browse Source..." and navigate to where you cloned the repository with Git.
- Next to "Where to build the binaries:", select "Browse Build..." and select a place to build the ITK library. For example, you could use c:\build\ITK. This directory MUST NOT be inside the directory where you cloned the repository.
- Click "Configure", and then specify "MinGW Makefiles"as the generator for this project.
- Choose your build options. I like to UNCHECK BUILD_EXAMPLES and BUILD_TESTING as they speed up the build process significantly.
- Click "Generate".
- Start a MinGW Shell (Start -> Programs -> MinGW -> MinGW Shell)
- Navigate to the Build directory you specified through CMake (e.g. cd /c/build/ITK)
- Run 'mingw32-make' (note: 'make' does not seem to produce any errors, but it seems to not do anything (just returns immediately to the terminal)