trippedoutfish
trippedoutfish

Reputation: 367

Trying to build Boost with gcc toolchain

For some reason when I try to run b2 with toolset=gcc I get the following.

C:\boost_1_49_0>.\b2.exe toolset=gcc
C:/boost_1_49_0/tools/build/v2/tools\gcc.jam:129: in gcc.init from module gcc
error: toolset gcc initialization:
error: no command provided, default command 'g++' not found
error: initialized from
C:/boost_1_49_0/tools/build/v2/build\toolset.jam:38: in toolset.using from modul
e toolset
C:/boost_1_49_0/tools/build/v2\build-system.jam:481: in process-explicit-toolset
-requests from module build-system
C:/boost_1_49_0/tools/build/v2\build-system.jam:562: in load from module build-s
ystem
C:\boost_1_49_0\tools\build\v2/kernel\modules.jam:283: in import from module mod
ules
C:\boost_1_49_0\tools\build\v2\kernel\bootstrap.jam:142: in boost-build from mod
ule
C:\boost_1_49_0\boost-build.jam:17: in module scope from module

What am I doing wrong?

Edit: I had to add C:\MinGW\bin to my Path environment variable.

Upvotes: 4

Views: 9172

Answers (2)

Kamran Amini
Kamran Amini

Reputation: 1062

You should run this command in a command line which can access mingw/cygwin bin directory. I mean when you type g++ it works and doesn't return command not found. If you are using mingw or cygwin they have dedicated command lines which g++ (bin directory) paths are registered in environment variables. Of course you can use Eclipse for compiling your c++ apps under windows.

Upvotes: 1

pag3faul7
pag3faul7

Reputation: 428

You are building Boost with gcc toolset on a Windows Machine (Cygwin, MinGW)? The main problem here is that the Boost build system can not find your compiler. Make sure g++ is in your path.

Upvotes: 0

Related Questions