install boost on windows with codeblocks

本秂侑毒 提交于 2019-12-09 01:54:27

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/14181832/install-boost-on-windows-with-codeblocks

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!