Building/Windows/MinGW

From enGrid Wiki

Jump to: navigation, search

Building with MinGW

NOTES:

  • These instructions are currently outdated and will not work for the latest branches on enGrid's git.
  • The ParaView development version built with MSVC will not work with MinGW!


These instructions are oriented for a development environment based in Eclipse and MSys, using already built MinGW versions of VTK and Qt. Currently this tutorial doesn't cover the installation process of this whole environment.



Contents

Preparations

First you must reconfigure the paths to your development environment. In the folder engrid\src\windows\mingw32 are three files that need to be configured:

  • mingwvars.bat - where you update the location of the MinGW folder. Sample:
    rem source the environment variables for the chosen mingw installation
    set PATH=%PATH%;Q:\mingw440\bin

    This adds MinGW's binary folder to the search path. Adjust accordingly the setting Q:\mingw440\bin to suit your installation.

  • qtvars.bat - where you change the folder where Qt (also built with MinGW) is installed. Sample:
    rem source the environment variables for the chosen qt installation
    call Q:\4.7.2\bin\qtvars.bat
    
    This calls the batch file that sets up Qt's development environment. Adjust accordingly the setting Q:\4.7.2\bin to suit your installation. If your installation does not have qtvars.bat, you can copy-paste a sample from here: qtvars.bat for MinGW
  • vtkvars.bat - where you define where VTK is built and installed, including the development files. Sample:
    rem source the environment variables for the chosen VTK installation
    set VTKINCDIR=P:\OpenAPIs\VTK 5.6\VTK_msys\include\vtk-5.6
    set VTKBINDIR=P:\OpenAPIs\VTK 5.6\VTK_msys\bin
    set VTKLIBDIR=P:\OpenAPIs\VTK 5.6\VTK_msys\lib
    
    set PATH=%PATH%;%VTKBINDIR%;%VTKLIBDIR%
    
    Adjust the 3 paths P:\OpenAPIs\VTK 5.6\VTK_msys to suit your installation.


The strange drive letters are used because of the storage system used by the author; this method enables an easier portability for using multiple machines with different disk drives or networked drives. For local drive letter assignment, you can use for example:
subst P: C:\Program Files
To remove the substitute drive letter, use:
subst P: /D

A final preparation is related to using parallel compiling with g++. In Qt's installation folder, the file mkspecs\win32-g++\qmake.conf needs to be modified to always assume that we are using MSys. Here you can find an example of the modified file contents: Building/Windows/qmake.conf


Setting up Eclipse

This deserves a separate subsection due to the complexity of setting up Eclipse. (TODO)

Building in Eclipse

(TODO)


go back to Building/Windows

Personal tools