|
Boost Users : |
Subject: [Boost-users] Boost.Python can't link using downloaded pre-compiled binaries
From: Heng Zhou (hzhou3_at_[hidden])
Date: 2017-05-25 03:01:56
Following are the environment:
- Windows 7 Enterprise SP1 64 bit
- Python 2.7.13
- Visual Studio 2015 (v14.0)
Following are the steps to the problem:
(1) I downloaded boost_1_64_0-msvc-14.0-64.exe from
https://urldefense.proofpoint.com/v2/url?u=https-3A__sourceforge.net_projects_boost_files_boost-2Dbinaries_1.64.0_&d=DwIBaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=uu0095bHyY4u8_4aL_8VSkoBAibccyzY1AWGIZA2kCM&m=VSW-VsQfEXq3HBydeHEvLNNj_uycGGoKJROuR73u4zs&s=YalbXHrjJuRH5y-VhXT4u0sM6Bbq9HArvy2EpPpppcs&e= . Since
it is pre-compiled binary, I think there is no need to build Boost.Python
manually. Note that it is for 64 bit build in VS2015 if I understand
correctly.
(2) Install the pre-compiled binary to C:\local\boost_1_64_0
(3) Follow the Boost.Python's QuickStart here:
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.boost.org_doc_libs_1-5F49-5F0_libs_python_doc_tutorial_doc_html_index.html&d=DwIBaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=uu0095bHyY4u8_4aL_8VSkoBAibccyzY1AWGIZA2kCM&m=VSW-VsQfEXq3HBydeHEvLNNj_uycGGoKJROuR73u4zs&s=gBej1dWvGIQEAbW0ZO1f254j3n3sAmQ1_jfuMqWGZ8s&e= .
The source code are the same as shown therein.
(4) Set in VS2015 Property Pages->C/C++->Additional Include Directories:
C:\local\boost_1_64_0;C:\Python27\include
Set in VS2015 Property Pages->Linker->Additional Library Directories:
C:\local\boost_1_64_0\lib64-msvc-14.0;C:\Python27\libs
Set in VS2015 Property Pages->Linker->Input->Additional Dependencies:
boost_python-vc140-mt-1_64.lib;boost_python-vc140-mt-gd-1_64.lib;%(AdditionalDependencies)
Set in VS2015 Property Pages->General->Configuration Type: Dynamic Library
(.dll)
(5) Build under x64 configuration and got errors:
1>Source.obj : error LNK2001: unresolved external symbol __imp_PyString_Type
1>Source.obj : error LNK2001: unresolved external symbol
__imp__Py_NoneStruct
1>C:\...\ConsoleApplication1\x64\Release\ConsoleApplication1.dll : fatal
error LNK1120: 2 unresolved externals
I have no idea what the matter is. I will greatly appreciate it if you can
help me out.
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