close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Version 9 (modified by Jorge, 10 years ago) (diff)

--

How to compile TOL on Windows with gcc-mingw32

In this page we describe how to compile TOL for Windows with the compiler gcc-mingw32. We recommend to use the compiler provided in Rtools because we want to ensure a smooth integration with R. All the external code used in TOL has being also compiled with that compiler. Below we provide information about all the tools and libraries used and the full development environment.

Prerequisites

Prepare a root directory, for instance

mkdir c:\users\toldevel

Next install the required packages and tools as described below.

Subversion

In order to download the source code we need subversion. You can download a good subversion client for windows from TortoiseSVN Make sure to select the option "command line client tools" as "Will be installed on hard drive" which comes unselected by default.

CMake

CMake is a family of tools designed to build, test and package software. CMake is able to generate from a set of configuration files either the Makefile for Unix or a workspace for Visual Studio o CodeLite for Windows. We can download it from CMake download.

TOL external libraries

TOL depends on a set of external libraries provided by the open source community. All this libraries has been compiled with Rtool and packaged in a bundle. This package can be downloaded from TOL_DEVEL_MINGW32. This package must be unpacked, for instance under c:\users\toldevel

Rtools

Rtools is a set of tools to compile R packages and R itself. We have chosen this tools to compile also TOL in order to make smoother the integration between TOL and R. You can download it from Rtools download. When installing accept all the suggested path and installation options.

One more step is required, we need to download mingw32-make.exe and install it to C:\Rtools\gcc-4.6.3\bin\.

CodeLite

We recommend CodeLite as a good IDE to develop TOL in windows because CMake is able to generate native workspace from the CMake configuration files. The configuration described next requires the instalation of this IDE which can be downloaded from CodeLite download. While installing it is not required to install the mingw32 compiler as we are going to use the compiler from Rtools.

Download source code of TOL

The source code of TOL can be downloaded with svn. For instance the main development branch (trunk) can be downloaded like:

cd c:\users\toldevel
svn co https://www.tol-project.org/svn/tolp/trunk 

Configuration of build process

The build process is configured with CMake. The first step is to create the build directory where the CodeLite workspace and Makefile will be generated:

mkdir c:\users\toldevel\trunk\Build\CodeLite\Debug
mkdir c:\users\toldevel\trunk\Build\CodeLite\Release

Next move into the Debug directory and configure to build the debug flavor of TOL

cd c:\users\toldevel\trunk\Build\CodeLite\Debug
cmake -DTOL_EXTERNAL_DEVEL_DIR=C:/users/toldevel/TOL_DEVEL_MINGW32 -DCMAKE_BUILD_TYPE=Debug -G"CodeLite - MinGW Makefiles" c:/users/toldevel/trunk/tol

The release flavor is configured like:

cd c:\users\toldevel\trunk\Build\CodeLite\Debug
cmake -DTOL_EXTERNAL_DEVEL_DIR=C:/users/toldevel/TOL_DEVEL_MINGW32 -DCMAKE_BUILD_TYPE=Release -G"CodeLite - MinGW Makefiles" c:/users/toldevel/trunk/tol

At dis point we can run CodeLite IDE and open any of the workspaces generated at Build\CodeLite\Debug or Build\CodeLite\Release

Attachments (3)

Download all attachments as: .zip