Hello, I am new to VC++ (ver 8) and would really like to use Boost! This is what I have done: 1) I unzipped the boost download to c:\boost_1_33_1 2) At the command prompt, I executed: c:\boost_1_33_1\>bjam "-sTOOLS=VC-8_0" install bjam ran fine and a new directory was created: c:\boost\include\boost-1_33_1\boost c:\boost\lib I had assumed that using bjam's install parameter would modify whatever the path settings for the VC IDE are supposed to be, but that does not appear to happen. There are alot of paths and I want to make sure that I use the right one. What are the paths that I am supposed to include in VC++ when using the bjam param 'install' above? Secondly, I was thinking that maybe the 'stage' param might be a better bjam choice since the boost libraries are built in a common directory, thus making it easier to use. Are there drawbacks to using boost this way? Thank you very much
Jeff Dunlap
Hello, I am new to VC++ (ver 8) and would really like to use Boost!
This is what I have done:
1) I unzipped the boost download to c:\boost_1_33_1
2) At the command prompt, I executed: c:\boost_1_33_1\>bjam "-sTOOLS=VC-8_0" install
bjam ran fine and a new directory was created:
c:\boost\include\boost-1_33_1\boost c:\boost\lib
I had assumed that using bjam's install parameter would modify whatever the path settings for the VC IDE are supposed to be, but that does not appear to happen. There are alot of paths and I want to make sure that I use the right one. What are the paths that I am supposed to include in VC++ when using the bjam param 'install' above?
Secondly, I was thinking that maybe the 'stage' param might be a better bjam choice since the boost libraries are built in a common directory, thus making it easier to use. Are there drawbacks to using boost this way?
Thank you very much
Hi Nathan, Thanks for your response. I'm new to VC++ and don't know how libs are configured for use in VC. Do you first make a brand new copy of the built boost libraries each time you make a new application, then configure your application to reference the boost libraries? If so, is there any way to have a single copy of the libraries and statically link different applications to the same library instead of creating a copy of the boost libs for each app? Please advise
Hi Jeff, Note in the "Automatic Linking on Windows" section of the Getting Started guide ( http://www.boost.org/more/getting_started.html) that there are only a few Boost libraries that require you to link against link libraries. (See http://www.boost.org/libs/libraries.htm for all Boost libraries). All of the other Boost libraries you just need to include the header files.
If so, is there any way to have a single copy of the libraries and statically link different applications to the same library instead of creating a copy of the boost libs for each app?
Yes, multiple projects can reference the same copy of the link libraries.
You generally will only need to build the boost libraries once, and can then
reuse them from project to project (assuming you're using the same runtime
library settings from project to project). Note that a better option may be
to just download the already built libraries (includes headers) from:
http://www.boost-consulting.com/download.html. Run the "installer" and then
select the "Variant" options you need (the need to match the runtime library
settings that you are using for your project to avoid link errors). I've
only looked at this installer for the first time today, but it appears to be
rather nifty
Once you've got the libraries, there are only two project settings you'll
need to set in Visual Studio.
1. Right click your project to get the "Project Property Pages".
2. Select "C/C++ (General)", and enter the path to the boost header files
in "Additional Include Directories".
3. Select "Linker (General)", and enter the path to the boost library files
in "Additional Library Directories".
Nathan
P.S. I like to put all as much of my project settings as possible
into Property Sheets, see
http://msdn2.microsoft.com/en-us/library/a4xbdz1e(VS.80).aspx
for more info.
On 3/16/07, Jeff Dunlap
Thanks for your response. I'm new to VC++ and don't know how libs are configured for use in VC. Do you first make a brand new copy of the built
boost libraries each time you make a new application, then configure your application to reference the boost libraries? If so, is there any way to have a single copy of the libraries and statically link different applications to the same library instead of creating a copy of the boost libs for each app?
participants (2)
-
Jeff Dunlap
-
Nathan McDaniel