Building Boost -- g++ not recognized?

Started by
4 comments, last by theOcelot 15 years, 8 months ago
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.
Advertisement
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.
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.
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.
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?
I'm in business! I built the whole mess, and successfully linked with boost.regex. Thanks everyone!

This topic is closed to new replies.

Advertisement