Skip to content

Boost.Application on MinGW

retf edited this page Jul 11, 2014 · 9 revisions

Boost.Application on MinGW

This simple article show how use Boost.Application on MinGW

  1. Download MinGW from http://www.mingw.org/

  2. Install it, and add 'C:/MinGW/bin' to your PATH.

  3. Install gcc -> open a console window and type:

mingw-get install gcc

  1. Build Boost for MinGW

From your boost_X_XX_X directory, go to

.\tools\build\v2

in my case : C:\boost_1_54_0\tools\build\v2

and type:

bootstrap.bat mingw

cd C:\boost_1_54_0\tools\build\v2

bootstrap.bat mingw

Return to your boost_X_XX_X directory and type:

bjam toolset=gcc

  1. Install Boost.TypeIndex 4.0 (for boost < 1.56)

If you are using boost < 1.56 you need install Boost.TypeIndex 4.0

5.1) Download it from : https://github.com/boostorg/type_index

5.2) Copy content of: c:\type_index\include\boost\ to C:\boost_1_54_0\boost\

  1. Install Boost.Application 0.4.9

6.1) Download it from : https://github.com/retf/Boost.Application

6.2) Copy content of: c:\application\include\boost\ to C:\boost_1_54_0\boost\

  1. Install, compile and run "tests" **

7.1) Create a new folder called "application" inside C:\boost_1_54_0\libs\

7.2) Copy folder: c:\application\test to C:\boost_1_54_0\libs\appliacation

c:\application*

7.3) Compile and run:

cd C:\boost_1_54_0\libs\application\test

bjam toolset=gcc define=BOOST_APPLICATION_FEATURE_NS_SELECT_BOOST

Use BOOST_APPLICATION_FEATURE_NS_SELECT_BOOST to force use of boost (boost::shared_ptr, boost::unordered_map and so on) as default

  1. Install, compile and run "example"

8.1) Create a new folder called "application" inside C:\boost_1_54_0\libs\

8.2) Copy folder: c:\application\example to C:\boost_1_54_0\libs\application

8.3) Compile and run:

cd C:\boost_1_54_0\libs\application\example

bjam toolset=gcc

The examples defines 'BOOST_APPLICATION_FEATURE_NS_SELECT_BOOST' direct on code

[*] c:\application = your download from github

[**] The "bjam" needs to be available in the system

  • NOTE about shared_library module

In mingw we have some problems in shared_library, at this time we don't support shared_library for MINGW32 you can download port yourself from: https://code.google.com/p/dlfcn-win32/downloads/list

Clone this wiki locally