Skip to main content
gamedev.net
🔒 Locked

Install Boost

Started by Grain Jun 14, 2006 at 12:24 PM 12 replies 1.2k views
Original Post
Grain
Grain
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.
swiftcoder
swiftcoder
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]
mrbastard
mrbastard
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"]
Doggan
Doggan
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.
SiCrane
SiCrane
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.
BeanDog
BeanDog
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!
mrbastard
mrbastard
SiCrane: Hmm. I was probably remembering half reading this , where you essentially said the same thing you did here.
[size="1"]
Grain
Grain
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?
Fruny
Fruny
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
Grain
Grain
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?
Fruny
Fruny
Is it trying to re-compile it? What have you done so far?
"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
Grain
Grain
No its not. It compiles my project flies and the library I included "GameTextureLoader" which is whats using boost.
deathkrush
deathkrush
"bjam.exe -sTOOLS=vc-7_1 install" installs libs into "lib" directory, in your case it may be C:\lib. You need to add this directory to Visual Studio "Library files" path.
deathkrushPS3/Xbox360 Graphics Programmer, Mass Media.Completed Projects: Stuntman Ignition (PS3), Saints Row 2 (PS3), Darksiders(PS3, 360)
ChaosEngine
ChaosEngine
btw there is an (unofficial) binary installer available now.
have a look on this website
http://www.boost-consulting.com/download.html
if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.