Sign in to follow this  
theOcelot

Building Boost -- g++ not recognized?

Recommended Posts

theOcelot    498
So I tried building boost today. I put bjam into my boost root, and ran it as follows:
bjam --build-dir="builddir" --toolset=gcc stage
It failed miserably. The first error message was "g++ is not recognized as an external or internal command, program or batch file", or whatever that standard message is. I'm guessing that this has something to do with GCC not being installed quite right. It came with Dev-C++, so was probably not really configured for command line use, but I know nothing, so I am completely at your mercy for help. After that first error (repeated twice) was what appeared to be a log of the compilation of each target(?) in the boost library. Generally, I remember them being "skipped", for lack of something or other. If you need to know exactly what happened, I'll run it again and try to remember more clearly. But I don't think the command prompt supports copy and paste. Windows XP SP2.

Share this post


Link to post
Share on other sites
Kylotan    9850
I'd suggest getting rid of Dev-C++, for a start. It's ancient and outdated, and I'd be surprised if it can cope with using Boost. Code::Blocks is a far better alternative if you're unable or unwilling to go with the free Microsoft compiler and IDE. Code::Blocks also installs gcc for you, a more recent version.

Having said that, bjam is notoriously awkward to use and I wouldn't be surprised if there's some other subtlety there. You would probably need to have your compiler directory in your PATH environment variable.

Share this post


Link to post
Share on other sites
theOcelot    498
Oh yeah, I dumped Dev-C++ a long time ago! I'm just saying that's where my initial installation of GCC came from. Been using Code::Blocks for a while.

I'll see about the PATH variable. At what point would I want to re-install GCC? That's sort of the nuclear option.

Share this post


Link to post
Share on other sites
oler1s    585
Quote:
At what point would I want to re-install GCC?
At the point where you find that your aging mingw-gcc compiler is too old. It should be workable, since I think the Dev-C++ package installs the 3.4 version of gcc. That's passable. The best you can get from mingw seems to be 4.3, so you may consider upgrading.

Share this post


Link to post
Share on other sites
theOcelot    498
Finally got it building! I'm noticing that it seems to be creating both a lib and dll version of each file. Is this so that I can use either one in my project? Just curious how that works.

Edit: It actually finished building while the comment was submitting. Internet is slow today, it seems. It tells me it failed updating 12 targets, skipped 8, and updated 293. I don't know which ones it skipped and failed, because the console window only holds so much, but I think that, among others, they involved boost.wave and boost.graph. How worried should I be?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this