Building Boost

Started by
5 comments, last by Decrius 16 years, 1 month ago
The guides they have here are a bit limited, I have no idea what they talk about and how I can build Boost::Filesystem in MingW (CodeBlocks). I have downloaded the pre-compiled version of bjam, and when I make a batch file with arguments for bjam it creates a directory bin.v2, inside that dir I have a lot of empty directories. It also somehow says: failed to compile "..." and g++ is an unknown app I copied g++.exe to the same directory...it seemed to do more...but the text is going to fast to read =/ Any help would be very much appreciated :) Decrius
[size="2"]SignatureShuffle: [size="2"]Random signature images on fora
Advertisement
Did you read the getting started guide ?

I used this guide to build boost for Windows and Mac OS X; its pretty straight forward and beginner friendly.
Quote:Original post by fpsgamer
Did you read the getting started guide ?

I used this guide to build boost for Windows and Mac OS X; its pretty straight forward and beginner friendly.


I found it being pretty vague. It has very short descriptions and is primarily for Visual Studio.

[size="2"]SignatureShuffle: [size="2"]Random signature images on fora
Quote:Original post by Decrius
Quote:Original post by fpsgamer
Did you read the getting started guide ?

I used this guide to build boost for Windows and Mac OS X; its pretty straight forward and beginner friendly.


I found it being pretty vague. It has very short descriptions and is primarily for Visual Studio.


Did you read the note at the top of the Windows build instructions regarding MinGW users:

A note to Cygwin and MinGW users

If you plan to use your tools from the Windows command prompt, you're in the right place. If you plan to build from the Cygwin bash shell, you're actually running on a POSIX platform and should follow the instructions for getting started on Unix variants. Other command shells, such as MinGW's MSYS, are not supported—they may or may not work.


May I suggest either installing Visual Studio Express Edition (which is free), or Cygwin.
If you can't get bjam to work, you can generally just add the relevant source files to your project with a bit of finesse. Generally this involves uncommenting the #define BOOST_ALL_NO_LIB line in boost/config/user.hpp and some libraries you need to add additional defines to your project. For example, for boost::python you need to add BOOST_PYTHON_STATIC_LIB to the list of preprocessor definitions for your project.
Both myself and others have got it to compile under Mingw, so it is far from impossible.

@Decrius

My guess is that you need to add your compiler's directory to your PATH environmental variable. To see your path, open a command prompt (windows key + r, type "cmd") and enter "echo %PATH%".

If this doesn't contain your compiler's folder, add it by going into system properties (windows key + pause, or right click on my computer and choose "properties"), choose the "advanced" tab, click the "environmental variables" button. Find an entry called "PATH" and append a semicolon and the C:\path\to\g++, so "lots;of;other;entries;C:\path\to\g++".

Check that your new path works by opening another command window (don't use the same one, AFAIK environmental variables are set at process start) and see if you can run g++ from a directory that doesn't have g++.exe in it.

Once you have that set up and barring any other problems it should build correctly then.
Thanks rip-off, that fixed it :).
[size="2"]SignatureShuffle: [size="2"]Random signature images on fora

This topic is closed to new replies.

Advertisement