Newbie: Building boost with Visual Studio 2008

Hi I have a question about building boost 1.43 with Visual Studio 2008. I have performed the following steps: 1) Downloaded and extracted boost_1_43_0.zip to C:\boost_1_43_0. 2) Built bjam (using tools\jam\src\build.bat). 3) Ran bjam in C:\boost_1_43_0 bjam ran successfully but the resulting tree contains .obj files but not all .lib files (for example, the RegEx libs are missing). I then ran: bjam.exe install This created folder c:\Boost, which does contain all the libraries and successfully links with the RegEx example program in 'boost: Getting Started on Windows'. That article ('boost: Getting Started on Windows') does not specify that I should run bjam install. Why was 'install' necessary in my case? Now I do not know whether to use C:\boost_1_43_0, which contains the headers and documentation, or C:\Boost, which contains the headers and libraries, as boost root. Obviously, if I choose the former, I need to fix it's build process. I want a solution that I can recommend to our development team. Please can someone advise me what is best practice? Best regards David

On 07/07/2010 11:55, David Aldrich wrote:
Hi
I have a question about building boost 1.43 with Visual Studio 2008. I have performed the following steps:
1) Downloaded and extracted boost_1_43_0.zip to C:\boost_1_43_0. 2) Built bjam (using tools\jam\src\build.bat).
Well, it's normally by running bootstrap.bat at
3) Ran bjam in C:\boost_1_43_0
bjam ran successfully but the resulting tree contains .obj files but not all .lib files (for example, the RegEx libs are missing).
What is your exact command? That would help people to help you. Are you
sure you didn't have all the necessary files there? It's (by default) in

Hi KTC Thanks for your reply.
Well, it's normally by running bootstrap.bat at
/ but okay.
Ok, I have built bjam that way now.
What is your exact command?
I just ran 'bjam'. That does indeed place the libraries in

AMDG David Aldrich wrote:
When I build it I get error:
LINK : fatal error LNK1104: cannot open file 'boost_python-vc90-mt-gd-1_43.lib'
Why does the linker want a library file beginning 'boost_python' when bjam has generated library files beginning 'libboost_python' ?
The linker is looking for the import library for a DLL. You can build this with bjam --with-python link=shared or you can compile your project with -DBOOST_PYTHON_STATIC_LIB (Boost.Python uses different auto-link conventions from the rest of Boost) In Christ, Steven Watanabe

Hi Steven Thanks for your reply.
The linker is looking for the import library for a DLL. You can build this with bjam --with-python link=shared
I chose this solution and the project now builds successfully. However, when I run the project's executable I get: "This application failed to start because boost_python-vc90-mt-gd-1_43.dll was not found" So we have satisfied the linker but not the runtime. Please can you advise me how to fix this problem? Best regards David

AMDG David Aldrich wrote:
The linker is looking for the import library for a DLL. You can build this with bjam --with-python link=shared
I chose this solution and the project now builds successfully.
However, when I run the project's executable I get:
"This application failed to start because boost_python-vc90-mt-gd-1_43.dll was not found"
So we have satisfied the linker but not the runtime. Please can you advise me how to fix this problem?
You need to add the library directory to your PATH. In Christ, Steven Watanabe
participants (3)
-
David Aldrich
-
KTC
-
Steven Watanabe