ITK/Configuring and Building/MinGW: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
mNo edit summary
mNo edit summary
Line 9: Line 9:
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 mingw to your path (Add "c:/MinGW/bin" to the "Path" variable here: Right click my computer -> Properties -> Advanced System Settings -> Advanced -> Environment variables)


* Launch the CMake GUI by running 'cmake-gui'
* 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. I like to use c:\build\ITK. This directory should 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 "Visual Studio 10" as the generator for this project.
* Click "Configure", and then specify "MinGW" 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".
* Open Visual Studio 2010
 
* Open Project
* Navigate to the Build directory you specified through CMake
* Navigate to the Build directory you specified through CMake
* Open the ALL_BUILD project
* From the Build menu, choose "Build Solution" (or "Build ALL_BUILD")

Revision as of 17:09, 14 September 2012

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/

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)

  • 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" 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