1

I'm following this guide to install Boost on Windows XP running CodeBlocks: http://wiki.codeblocks.org/index.php?title=BoostWindowsQuickRef. I have downloaded Boost and BoostJam and the versions are

Boost: 1.52.0 BoostJam: 3.1.18.1-ntx86

I am trying to build Boost (the section "Build Boost" in the guide), so I have set the PATH succesfully to c:\boost-jam

Now I want to run boost-jam, and I write: bjam --toolset=gcc "--prefix=c:\program files\codeblocks" install

This is where I get an error. The command prompt tells me: "warning: mismatched versions of Boost.Build engine and core". Is the guide I am following outdated?

BillyJean
  • 1,537
  • 1
  • 22
  • 39

1 Answers1

4

I faced the same problem when I tried to setup boost from source. The best approach is to build bjam from source (it comes with boost). First make sure you have mingw gcc on your path, and then, on the command line, navigate to

< boost-root >/tools/build/v2/engine

With <boost-root> being the folder into which you extracted the boost source code.
From here, invoke build.bat gcc.

This will build an executable (b2.exe and/or bjam.exe). Copy it to <boost-root> and invoke it with the options you need.

StoryTeller - Unslander Monica
  • 165,132
  • 21
  • 377
  • 458
  • Thanks. I tried adding gcc to my path as described exactly here (http://stackoverflow.com/questions/5733220/how-to-add-mingw-bin-directory-to-my-system-path), but I still can't build bjam. Do you if I am missing something? The path I have added is C:\Program Files\CodeBlocks\MinGW\bin – BillyJean Jan 07 '13 at 16:24
  • 1
    are you able to invoke gcc from the command line? Say `gcc --version` ang `g++ --version`? – StoryTeller - Unslander Monica Jan 07 '13 at 16:33
  • no, that is also currently the way I am testing to see if it works. I get the reply that the command is unrecognized, but I have added the path exactly as described in the link above – BillyJean Jan 07 '13 at 16:35
  • OK, and when you `echo %PATH%` on the commandd line it lists the directory you added? If so, check to see if `gcc.exe` is for certain in `C:\CodeBlocks\MinGW\bin`. – StoryTeller - Unslander Monica Jan 07 '13 at 16:39
  • the path is there: c:\program files\codeblocks\mingw\bin\ and gcc.exe is indeed inside that directory. This is extremely strange! – BillyJean Jan 07 '13 at 16:46
  • Right, last ditch effort, did you call `gcc --version` or `gcc.exe --version`? – StoryTeller - Unslander Monica Jan 07 '13 at 16:50
  • 1
    Don't know what to tell you, mate. Perhaps you should try installing MinGW separately. If that works you can always configure CodeBlocks to work with that installation. – StoryTeller - Unslander Monica Jan 07 '13 at 16:53