Install Boost

Started by
12 comments, last by ChaosEngine 17 years, 10 months ago
How do get boost to work with VC71? I tried reading http://www.boost.org/more/getting_started.html#Build_Install but there is a ton on information and I'm kind of lost as to where to start.
Advertisement
I would advocate finding a binary package, it is much simpler, though on the flip side, you may have to move to a newer version of VC first.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

start by reading the information they've provided?

It boils down to getting bjam, setting your path, and running bjam from the command line with the right -sTOOLS=***** thing.

If you prefer scouring forums over reading manuals, it may be worht looking through the jounals. Someone (either SiCrane or Fruny I think) posted a good article in their journal that went through building boost.

It really is quite simple though - read the instructions.
[size="1"]
Installing boost is a pain on Windows. I've done it a couple times for VC 7.1. If you follow the instructions on that page, it should all work. Just make sure you download the prebuilt binary of bjam (it's on their sourceforge page).

I have never seen a prebuilt binary package of boost - maybe the above poster could provide a link?

Also note, that many of the boost tools do not require compiling to use! For example, weak_ptr simply requires the header files - no compilation necessary.
I don't remember writing any such journal entry, and Fruny doesn't have one....

Personally, I don't use bjam to install boost. I just unzip it to a directory and add the boost directory to my include path. If I use a part of boost that normally requires bjam to build, I instead add the source files from the lib directory to my project. This requires uncommenting the #define BOOST_ALL_NO_LIB line in the config/user.hpp file and may require additional preprocessor definititions for the various libraries. For example, boost::python needs to have BOOST_PYTHON_STATIC_LIB defined if you don't use the bjam built DLL.
I had this problem--you can read the thread here. After being flamed mercilessly for not making it through that imposing "getting started" page (I feel your pain), I got the following instructions:
Quote:
1)Download Boost Libraries
2)Download Boost Jam and extract to your boost folder(should be named 'boost-[majorver].[minorver].[rev]' FOR EXAMPLE: 'boost-1.33.1'
3)Commandline to where bjam.exe has been put(this is done using the complex command 'cd'(changedir)
4)You will now want to type 'bjam.exe -[options] [install/stage]'
FOR EXAMPLE: If you're using the 2005 revision of the Microsoft Compiler(either Visual Studio 2k5, or Express Edition) and you simply want the libary files in one place so you can sort it out later, you would type: "bjam.exe -sTOOLS=vc-8_0 stage"

Except, of course, you'll change vc-8_0 to vc-7_1 (I believe that's correct).

Good luck!
SiCrane: Hmm. I was probably remembering half reading this , where you essentially said the same thing you did here.
[size="1"]
Alright it dumped a bunch of libs in C:\boost_1_33_1\bin\boost\libs. But each in its own subdirectory.

In order to use these do I need to add each one individually to my compilers linking path? Or is it ok to move them all in to one directory and simply use that one?
No. Now you use the 'install' parameter where before you used 'stage'. Honestly, the install process is simple if you take it one step at a time and do not try to skip ahead.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
OK now I typed "bjam.exe -sTOOLS=vc-7_1 install"

But I get a link error LNK1104: cannot open file 'libboost_iostreams-vc71-mt-1_33_1.lib'

I checked and the file does exist. What else do I have to do?

This topic is closed to new replies.

Advertisement