views:

60

answers:

2

I wanted to use boost::program_options. After I installed boost, I think that I have to build separatly program_options (http://www.boost.org/doc/libs/1_43_0/more/getting_started/windows.html). But I don't know how to do it.

I am trying to compile the C:\Program Files\boost\boost_1_42\libs\program_options\example\first.cpp (http://www.boost.org/doc/libs/1_42_0/doc/html/program_options/tutorial.html) but probably due to I didn't build the library I have this error:

LINK : fatal error LNK1104: cannot open file 'libboost_program_options-vc90-mt-gd-1_42.lib' 

EDIT: I used the installers supplied by BoostPro Computing so I skipped the installation of the binaries (http://www.boost.org/doc/libs/1_43_0/more/getting_started/windows.html#install-visual-studio-binaries)

EDIT: I also followed the instructions at http://www.boost.org/doc/libs/1_43_0/more/getting_started/windows.html#build-from-the-visual-studio-ide

A: 

I've followed these steps and it worked pretty well. That is to build the few boost libraries that must be built separately.

I suggest you read the entire document.

f4
Do you mean:bootstrap.\bjam??I have no bootstrap, neither bjam.
andofor
There is a .bat in boost's directory (probably called bootstrap.bat) you have to run it and it'll build bjam. bjam will build the libraries for you. btw you need to open the command prompt this way : http://www.boost.org/doc/libs/1_43_0/more/getting_started/windows.html#or-build-from-the-command-prompt
f4
@f4: Not if you use the BoostPro installers.
Billy ONeal
A: 

You might want to use precompiled binaries, which can be downloaded here.

And make sure to set the library path in your VC project to point to boost libraries.

jpalecek
Yes, that's the site where I downloaded http://www.boostpro.com/download/boost_1_42_setup.exeInto my project I followed the instructions:http://www.boost.org/doc/libs/1_43_0/more/getting_started/windows.html#build-from-the-visual-studio-ide
andofor