Boost logo

Boost Users :

Subject: [Boost-users] How to correctly run Boost.Python?
From: Wenlong Wang (wwang_at_[hidden])
Date: 2013-09-25 09:49:27


Hi, All

 

This is my first message at this mailing list, apologies first if I
raised some simple question.

 

I am using Microsoft Visual Studio 2012 Express Version, and Python 2.7.
My boost version is 1.54.0.

 

I followed the Boost Library instruction at
http://www.boost.org/doc/libs/1_54_0/more/getting_started/windows.html#i
nstall-boost-build

 

And successfully build Boost in my computer with a message "The Boost
C++ Libraries were successfully built!" My Boost path is
"C:\local\boost_1_54_0"

 

Then I want to run Boost.Python, and find it requires to be built
separately. So, I found Boost.Python Library instructions at

http://www.boost.org/doc/libs/1_54_0/libs/python/doc/building.html#basic
-procedure

 

In step 3.1 Basic Procedure, the Boost.Python Library instructions lead
me back to Boost Library instruction section 5, at where I installed the
Boost.Build at "C:\local\boost_1_54_0\BoostBuild".

 

And "C:\local\boost_1_54_0\BoostBuild\bin" has been added to my Path
environment variable.

 

So now I am back to the Boost.Python Library instructions at section
3.1.3. I followed the instruction and cd into the
"C:\local\boost_1_54_0\libs\python\example\quickstart".

 

The next step, according to the instruction is :

 

Invoke bjam. Replace the "stage" argument from the example invocation
from section 5 of the Getting Started Guide
<http://www.boost.org/doc/libs/1_54_0/more/getting_started/index.html>
with "test," to build all the test targets. Also add the argument
"--verbose-test" to see the output generated by the tests when they are
run.

On Windows, your bjam invocation might look something like:

C:\boost_1_34_0\...\quickstart> bjam toolset=msvc --verbose-test test

 

Then I got 135 unresolved external errors. One of them is as follows:

exec.obj : error LNK2019: unresolved external symbol
__imp__PyEval_GetGlobals referenced in function

"class boost::python::api::object __cdecl boost::python::eval(class
boost::python::str,class boost::python::api::object,class
boost::python::api::object)"

(?eval_at_python@boost@@YA?AVobject_at_api@12_at_Vstr@12_at_V3412@1_at_Z)

..\..\..\..\bin.v2\libs\python\build\msvc-11.0\debug\boost_python-vc110-
gd-1_54.dll : fatal error LNK1120: 135 unresolved externals

 

May I know what am I wrong? How can I fix this?

 

Thank you very much.

 

Regards

Long

 
Wenlong Wang
Risk Analyst, Capquest Group Ltd
  
Email: wwang_at_[hidden]
Fleet 27, Rye Close, Fleet, GU51 2QQ.
Website: http://www.capquest.co.uk/
 
This e-mail is intended solely for the addressee, is strictly confidential and may also be legally privileged. If you are not the addressee please do not read, print, re-transmit, store or act in reliance on it or any attachments. Instead, please email it back to the sender and then immediately permanently delete it. E-mail communications cannot be guaranteed to be secure or error free, as information could be intercepted, corrupted, amended, lost, destroyed, arrive late or incomplete, or contain viruses. We do not accept liability for any such matters or their consequences. Anyone who communicates with us by e-mail is taken to accept the risks in doing so. Opinions, conclusions and other information in this e-mail and any attachments are solely those of the author and do not represent those of Capquest Group Limited or any of its subsidiaries unless otherwise stated. Capquest Group Limited (registered number 4936030), Capquest Debt Recovery Limited (registered number 3772278), Capquest Investments Limited (registered number 5245825), Capquest Asset Management Limited (registered number 5245829) and Capquest Mortgage Servicing Limited (registered number 05821008) are all limited companies registered in England and Wales with their registered offices at Fleet 27, Rye Close, Fleet, Hampshire, GU51 2QQ. Each company is a separate and independent legal entity. None of the companies have any liability for each other's acts or omissions. Group VAT registration number 844281719. Members of the Capquest group are regulated under the Consumer Credit Act 1974 and are members of the Credit Services Association. This communication is from the company named in the sender's details above. 



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net