 |

|
Hi there,
I am new using boost library, pls help me to configure the boost in visual studio 2010.
please paste some screen shot for configuration , then its helpful for me.
Regards,
Ranjith
|
|
|
|

|
Hello,
Visual Studio 2010 supports the concept of 'property pages' in which you can specify library directories. The MSDN link is http://msdn.microsoft.com/en-us/library/669zx6zc%28v=vs.100%29.aspx, but the explanation is not very good.
Alternative you can use the 'traditional' way and just put your library directories in the project properties. This is not advised, but I show it here anyway because it's easier to explain. Note that my boost root directory is "c:\work sdk\boost_1_53_0" and I copied the build lib and dll files to "c:\work\bin\debug". Unfortunately I see no option here to paste images, so i have to explain it by text.
Add to your vcxproj file:
- Configuration Properties, C/C++, General, Additional Include Directories: "%(AdditionalIncludeDirectories);C:\Work Sdk\boost_1_53_0" (without quotes).
- Configuration Properties, Linker, General, Additional Library Directories: "\work\bin\debug" (without quotes).
Note that you still have to build Boost and use the auto link feature to get everything working.
|
|
|
|

|
I build a small tool (called BlueGo) which builds boost libraries using Visual Studio 2010/12 x64 automatically. You just have to start the application, select your configuration and hit the Build button - everything else works automatically. The application downloads the library, extracts it and builds it. It can be downloaded from my website: http://vertexwahn.de/[^]
|
|
|
|
|

|
Only one thing, both release and debug links for the .bat files give you the debug file. Not too tough to fix though compared to three hours surfing ...
|
|
|
|
|

|
Perfect explanation about build and configure boost libraries into Visual Studio Enviroment.
|
|
|
|

|
I am using 1_42 version of Boost Lib and I have to use the 64-bit version. For that I used this command.
bjam toolset=msvc-8.0 variant=debug threading=multi link=shared define=_BIND_TO_CURRENT_VCLIBS_VERSION address-model=64
It all went well. I included the Inc and lib file created in my project. But when I compiled my project it showed me this error
fatal error LNK1104: cannot open file 'libboost_regex-vc80-mt-gd-1_42.lib'
When I searched for this library in boost folder it didn't exist. Looks like it wase'nt created while compiling using BJam. can someone help me in resolving this problem?
Thanks in Advance
Maverick
|
|
|
|

|
Your project looks for the static library versions (libboost*.lib), instead of the DLL versions. Use the auto linking feature of Boost for correct linking, e.g. use '#define BOOST_ALL_DYN_LINK' before any boost header.
modified 30-Apr-12 4:08am.
|
|
|
|

|
I have an existing application . I downloaded boost library "boost_1_35_0" from this website
http://sourceforge.net/projects/boos.../boost/1.35.0/
and extracted it in program folder
C:\Program Files\boost\boost_1_35_0
and tried your steps, ran those batch files. Since I am using visual studio 2005 so have to make changes in the batch file. I replaced VC9.0 by VC8.0. After running those batch files instead of "libboost_regex-vc80-mt-1_35.lib" it only creates "boost_regex-vc80-mt-gd-1_35.lib". My program always looks for "libboost_regex-vc80-mt-1_35.lib" and throws error
Maverick
|
|
|
|

|
The libboost*.* variants are the static libraries. Either uses dynamic linking (either by Boost's auto linking feature '#define BOOST_ALL_DYN_LINK' or use #include "BoostDefines.hpp" from article before any boost header) or build the static libraries (through runtime-link=static)
|
|
|
|

|
How do I build boost libs for Windows 7 64-bit. I have Visual Studio 9. Any help is appreciated. Thank you.
|
|
|
|

|
add 'address-model=64'. e.g. the bjam command line for vstudio 2008 will be then:
bjam toolset=msvc-9.0 variant=debug threading=multi link=shared define=_BIND_TO_CURRENT_VCLIBS_VERSION address-model=64
|
|
|
|

|
I really wonder why anyone downvotes this answer since it solves the OPs question exactly.
|
|
|
|

|
Download boost source & bjam binary from boost website. Unzip source. Go to root directory in command shell. Type and run
bjam --build-type=complete stage
Results will be in the stage/lib subdirectory of your boost source directory. Point your VS library include directory to there and you're good to go, for all configurations (static/dynamic linking, debug/release, multi/single threaded runtime, ...)
|
|
|
|

|
i have vc++2005(studio) on win/xp (r2)
and the build fails - maybe the author can try the build with bjam with this newer ide?
|
|
|
|

|
( solution for vc++ 2005(studio) boost/regex 1.3.41 )
download: boost_1_34_1_setup.exe
from:
http://www.boost-consulting.com/products/free
and let it do what it does.
after: move to: ----> C:\Program Files\boost\boost_1_34_1\libs\regex\build
copy file vc8.mak ----> vc81.mak
inside vc81.mak change string: "-1_34" to: "-1_34_1"
and NOW:
nmake -fvc81.mak
at this point you can see that at sub-dir /vc80 ---> files + libraries are created.
at end:
copy the: libboost_regex-vc80-mt-gd-1_34_1 (extension object file library)
to:
C:\Program Files\boost\boost_1_34_1\lib
NOW: move to vc++2005(studio)
at the properties of the project:
Properties ---> Linker ---> Additional Library Directories
"c:\Program Files\boost\boost_1_34_1\lib"
and that's all !!!
|
|
|
|

|
I ve recently even build Boost 1.35 with visual studio 2008. I could upload the build script ifn't it was so painful to update one's own article...
|
|
|
|

|
Any plans to update your article?
thanks,
Alex
|
|
|
|

|
At home I use vstudio 2003 and Boost 1.38. The script line is:
bjam toolset=msvc-7.1 variant=debug threading=multi link=shared
At work I use vstudio 2008 and Boost 1.36. The script line is:
bjam toolset=msvc-9.0 variant=debug threading=multi link=shared
|
|
|
|

|
Does anybody tried to compile the 64-bit(x64) libraries on VS2005?
|
|
|
|

|
Under VS2008 try this... seems to work.
bjam --build-dir=c:\boost --build-type=complete --toolset=msvc-9.0 address-model=64 architecture=x86 --with-system --with-serialization -j4
Good luck,
Lars
|
|
|
|

|
I built the boost library.
as you said, it created bin directory inside the root directory.
but there are folders are existing as you said. but the dlls and lib files are not existing under these folders. Where I went wrong?
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|

|
Did you search in this bin directory for mt-gd-1_33? For example on my computer the date time library is located at: '<boost root>\Boost\bin\boost\libs\date_time\build\boost_date_time.dll\vc-7_1\debug\threading-multi\boost_date_time-vc71-mt-gd-1_33.dll.
|
|
|
|

|
yea... I could see the directories there but there's no dlls or lib are created. Just blank folders.
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|

|
I would like to build boost with the stdcxx STL. I don't know how to specify CPP_FLAGS and include path in order to build boost with this STL. I'm using VC8.
Any idea ?
Thanks, Nadine
|
|
|
|

|
Hi all,
I was using Microsoft Visual Studio 2005 Express to build the boost libraries. I used bjam to do it. The regex library can't be built because of some ICU problem. Some libraries are successful, while others are not. Can anyone help with this?
Thanks.
Y HUO
|
|
|
|

|
...for Visual Studio 2003 and 2005, anyway.
I recently got interested in Boost again, and a Google search turned up an executable installer that does everything for you. Here's a writeup I did for my co-workers:
If you have Visual Studio 2003 and/or Visual Studio 2005, Boost++ Consulting's installer makes Boost installation much easier than using the 'official' method at boost.org. The installer can also install a convenient Start Menu shortcut for uninstalling the Boost libraries later if you want. To me, the most important advantage of the installer is that the resulting installation of Boost takes significantly less disk space than using the official technique. (The only drawback of using the installer is that it downloads nearly a gigabyte of files, so the whole installation process usually takes a very long time.)
If you don't already have the installer, get it from the Boost++ Consulting site at http://www.boost-consulting.com/download.html[^]. As of this writing, the file's name is "boost_1_33_1_setup.exe".
When you run the installer it will ask you a series of questions about which Boost mirror site to download from, which libraries you want to install, and where you want to install them on your hard drive. The installer then downloads appropriate pre-compiled libraries from the selected mirror site and installs them.
The only thing the installer doesn't do is add the necessary directories to your Visual Studio configuration(s). Here's how you do that (the paths below correspond to the default installation path suggested by the installer):
Visual Studio 2003
Tools | Options...
Select the "Projects" folder, then "VC++ Directories".
Select "Include files" in the "Show directories for" drop-down list.
Add the line "C:\Program Files\boost\boost_1_33_1". I usually move it somewhere down near the bottom of the list to make sure the compiler looks for the standard include files and Platform SDK files before looking at the Boost headers.
Select "Library files" in the "Show directories for" drop-down list.
Add the line "C:\Program Files\boost\boost_1_33_1\lib"; again I put it somewhere near the bottom of the list.
Visual Studio 2005
Tools | Options...
Expand the "Projects and Solutions" item in the tree view, and then select "VC++ Directories".
Select "Include files" in the "Show directories for" drop-down list.
Add the line "C:\Program Files\boost\boost_1_33_1". I usually move it somewhere down near the bottom of the list to make sure the compiler looks for the standard include files and Platform SDK files first.
Select "Library files" in the "Show directories for" drop-down list.
Add the line "C:\Program Files\boost\boost_1_33_1\lib"; again I put it somewhere near the bottom of the list.
|
|
|
|

|
Doesn't work if you need to setup a proxy to access Internet !!!!!!
|
|
|
|

|
I dont see how this is a problem
|
|
|
|

|
After I read your article and built bjam all I did was run bjam with no arguments. Bjam built everything fine. I am running vs 2005.
Larry
|
|
|
|

|
hi,
can someone help me out for spawning vcspawn.exe in microsoft visual C++
I run the program of C++ in visual C++ 6.0 but i can't built it properly and give me error as spawning vcsspawn.exe.please help me out for that because
my project is not running with this error.
thanhs............
Nitin
nitin
|
|
|
|

|
Thanks!
I'm using Bost version 1.33.1, and I tried all morning to build the v2 version with no luck so far. The Jamfile and Jamfile.v2 files are completely different, so there's no chance of a quick fix, but at least desperation made me find your article.
I suggest you replace the "Note: I work with the latest version of Boost, which is 1.33." with "Note: I use the 1.33 version of Boost", unfortunately your article will be needed long after version 1.33 of Boost (what stops those otherwise bright guys from Boost from writing proper, clear installation instructions?)
Regarding your questions:
1. For some reason, the 'normal' (non dynamic) libraries get built. Can anyone help me on this issue?
Have a look at the "Re: static build correction"[^] message from gunters (and update your article accordingly .
2. Python library should also get built, but for some reason it gets excluded.
Again, it worked for me. I suspect the reason you don't get the Python library is:
A. you don't have Python installed. Install Python and try again (I used ActivePython-2.4.3.11-win32-x86.msi from ActiveState)
B. you have Python installed, but it is not the default version and/or location. Have a look for "--with-python-root" and "--with-python-version" in Jamfile file. The default values are Python version 2.4 installed in C:\Python24.
OGR
|
|
|
|

|
When I was trying to build the libraries using bjam. (for all release and debug)
I get message below and terminated. Any idea how to solve this one?
vc-C++ bin\boost\libs\serialization\build\boost_serialization.dll\vc-7_1\release\threading-multi\basic_pointer_iserializer.obj
failed to write command file!
I am using VS2003.NET and WinXP.
Sonork 100.41263:Anthony_Yio
|
|
|
|

|
There is a limit in the path name (the whole string from C:\ to your file name) in Windows. So you've probably installed boost source into a directory that is too deep. I usually subst a new drive letter for boost source tree and build from there to avoid this problem.
|
|
|
|

|
Here is the build string I personally use to build Boost. This works for me with 1.33.1 on vc 7.1 and 8.0.
First of all, it is a good idea to thoroughly read through Boost Getting Started[^].
I downloaded the prebuilt bjam.exe from SourceForge and stuck it in the Boost root folder. Saves a step and less CDing.
Change directory to the Boost root folder, and then:
bjam "-sBUILD=debug <runtime-link>dynamic <threading>multi" -sTOOLS=vc-8_0 --stagedir=. --with-python-version=2.4 --with-python-root=../Python-2.4.2 --with-pydebug stage
Notice I'm only building the multithread debug dll versions. If you want all versions, you can eliminate the -sBUILD parameter altogether.
Staging. I don't like the default locations Boost.Build puts stuff, so I tell it to "stage" to the root directory. This means it copies the build libs to the specified location. Since it always stages into a "lib" subfolder, this has the effect of putting the libs into <boost-root>/lib
If you want boost.python, Python needs to be built already, before you start building Boost. Boost needs the Python import libs. Notice the various --with-python* parameters above. You really need to tell Boost where your Python build is. It will try the defaults but you may get surprising results. I strongly recommend downloading the Python source and doing your own build, so the debug stuff can work properly. Note that I am using relative paths; I put all my third-party libs in one place. Your setup may vary.
I don't think there is a way to specify only static or dll versions of libs, since not all libs support both. This may change in Build v2.
-- modified at 17:23 Monday 13th February, 2006
|
|
|
|

|
Is there some options to build a 64-bit DLL's(VS2005)?
|
|
|
|

|
have to use boost 1.39. compile boost: bjam variant=debug,release link=static threading=multi address-model=64 runtime-link=static
chetan
|
|
|
|

|
Have you had a chance to try working with VC2005? I haven't been able to get it all to build yet. The main lib I use is regex. It builds but I can't get it to link correctly.
Any insights?
Thanks,
ed
~"Watch your thoughts; they become your words. Watch your words they become your actions.
Watch your actions; they become your habits. Watch your habits; they become your character.
Watch your character; it becomes your destiny."
-Frank Outlaw.
|
|
|
|

|
No still using 2003. It seems that vc2005 is not stable for large solutions, which is unsuitable for our 93 projects-solution.
|
|
|
|

|
Hello,
I'm building the boost libs with bjam.exe under the command prompt of VS.net 2005 with a batch file
constaining the following commands:
SET VC80_ROOT="d:\Program Files\Microsoft Visual Studio 8\Vc"
bjam.exe -sBOOST_ROOT=. -sTOOLS=vc-8_0 stage
all libs but the regex were successfully built.
I've built all of them successfully with similar settings in VS.net 2003.
Any one knows what the problem is?
Thanks
Max
|
|
|
|

|
Hello Max,
Did you try to build a 64-bit version of boost libs?
Thanks,
Oleg.
|
|
|
|

|
Hello Oleg,
No, I have not tried to build the 64-bit version of boost libs.
Any hints?
Max
|
|
|
|

|
Hi,
i'm trying to use boost regex.
but i'm having alot of trouble getting it to work in visual studio.
I did the same as you..and it gave me this directory sturctrue
c:\boost\lib (dll's and lib files)
c:\boost\include (a few sub folders and eventually the header files)
what code did u have to write in VS 7.1 to get this to work? I'm trying set the project include paths and include the header files like so "#include
regards
|
|
|
|

|
Hello,
Boost is located on my pc at c:\work sdk\boost (so under this directory, one has the bin, boost, doc, libs etc. subdirectories). Add e.g. 'c:\work sdk\boost' to the include patchs in VS 2003 and one can include regex through:
#include "boost/regex.hpp"
Libs, pdbs and dll's files should be copied (because they are scathered over a lot of subdirectories) to one lib directory and add this to the lib path in VS 2003 (for linking purposes) and environment path variable (for running the application, Windows must find the dll's).
|
|
|
|

|
Hi,
First of all thanks for your excellent page.
I have an error when I try to build jam :
C:\boost\tools\build\jam_src>.\bootstrap\jam0 -f build.jam --toolset=vc7 "--tool
set-root=C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\ "
...found 44 targets...
...updating 2 targets...
[MKDIR] bin.ntx86
spawn: Invalid argument
The same error occurs (spawn: Invalid argument) if I try to build Boost with a compiled version of jam. The path to VC7 is added on the PATH of Windows and I ran VCVARS32 before each compilation. Do you have an idea ?
Thanks a lot.
Best regards,
Al
|
|
|
|

|
Copy bjam.exe to the root of Boost (), and try again
|
|
|
|

|
I had a similar issue when compiling with gcc. Upgrading to the latest bjam version resolved the issue for me. hth
Chris
|
|
|
|

|
you need to add to path also some other things for me the following made a solution
C:\WINDOWS\system32;D:\Program Files\Microsoft Visual Studio 8\VC\bin;C:\Program Files\Common Files\Microsoft Shared\VSA\8.0\VsaEnv
|
|
|
|

|
I use
bjam "-sBUILD=debug dynamic multi" "-sTOOLS=vc-6_5-stlport"
bjam "-sBUILD=release dynamic multi" "-sTOOLS=vc-6_5-stlport"
to build Boost after setting the following environment var's:
set STLPORT_PATH=d:\
set STLPORT_462_PATH=D:\STLport_462
set STLPORT_VERSION=4.6.2
set STLPORT_VERSIONS=
Note:
The location of my STLport is D:\stlport_462. Version: 4.6.2
|
|
|
|
 |