Re: Boost Python Build Error
Robert via Boost-build <[email protected]>
| Newsgroups | gmane.comp.lib.boost.build |
|---|---|
| Message-ID | <[email protected]> |
On 2/21/2017 1:18 PM, Rene Rivera via Boost-build wrote: > There is a bug in building BPL stuff (all of it) that you just ran > into.. And that I'm trying to fix ATM. > > On Tue, Feb 21, 2017 at 11:35 AM, B Ku via Boost-build > <[email protected] <mailto:[email protected]>> wrote: > > Hi Guys, > > I am trying to get the Boost Python example working. > > I am running Windows. I downloaded the source code for > boost_1_63_0, ran the boostrap.bat file to generate b2.exe and > bjam.exe. Then I executed b2.exe to build libboost*.lib in state/lib. > > I then modified and placed the user-config.jam file in the > %HOMEDRIVE%%HOMEPATH% directory as follows: > > # Configure specific msvc version (searched for in standard > locations and PATH). > using msvc : 12.0 ; > > # Configure specific Python version. > using python > : 3.5 > : C:\\Users\\Ben\\AppData\\Local\\Programs\\Python\\Python35\\python.exe > : C:\\Users\\Ben\\AppData\\Local\\Programs\\Python\\Python35\\include > : C:\\Users\\Ben\\AppData\\Local\\Programs\\Python\\Python35\\libs > : <toolset>msvc > ; I write my user-config.jam using python line this way: using python : 2.7 : C:\\Python27 : C:\\Python27\\include : C:\\Python27\\libs ; The "python.exe" is not at the very end of the first path. Perhaps that is the difference? I do not know the b2 internals well enough to explain the significance of not including the python executable file. I also use the three environment variables: PYTHON_INCLUDE=C:\Python27\include PYTHON_LIB=C:\Python27\Lib PYTHON_VERSION=2.7 I am not sure b2 uses them. However, I do recall a python related compiler/linker problem many months ago, until I added the above three command prompt environment variables. I discover their use from the Intel web page that explains how to build Boost with the Intel C++ compiler on Windows, Linux, and OS X: https://software.intel.com/en-us/articles/building-boost-with-intel-c-compiler-150. The Windows section specifically lists adding these. Consequently, when I build with MSVC, the environment variables are present. I always obtain the boost_python.lib too. --Robert > > Then, I modified the libs/python/example/tutorial/Jamfile as > follows, so include .h files can be found: > project tutorial > : requirements > <include>../../../../ > <location>. > ; > > Finally, I copied the bjam.exe to libs/python/example, and executed > bjam.exe and got the following error: > > C:\Users\Ben\Home\boost\boost_1_63_0\libs\python\example>bjam.exe > ...patience... > ...found 996 targets... > ...updating 4 targets... > msvc.link.dll tutorial\hello_ext.pyd > LINK : fatal error LNK1181: cannot open input file 'boost_python.lib' > > call > "C:\Users\Ben\AppData\Local\Temp\b2_msvc_12.0_vcvarsall_x86.cmd" >nul > link /NOLOGO /INCREMENTAL:NO /DLL /NOENTRY /DEBUG /MACHINE:X86 > /MANIFEST /subsystem:console /out:"tutorial\hello_ext.pyd" /IMPLIB:"tut > if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL% > > ...failed msvc.link.dll tutorial\hello_ext.pyd > tutorial\hello_ext.pdb tutorial\hello_ext.pdb... > ...skipped <ptutorial>hello for lack of <ptutorial>hello_ext.pyd... > ...failed updating 2 targets... > ...skipped 2 targets... > > Is there a way to specify where the .lib files are supposed to be? > > Am I missing a step? By default, b2 generates lib files with this > name format: libboost*.lib, not boost_python.lib. > > Thank you very much for your help in advance! > > Thanks, > Ben > > _______________________________________________ > Unsubscribe & other changes: > http://lists.boost.org/mailman/listinfo.cgi/boost-build > <http://lists.boost.org/mailman/listinfo.cgi/boost-build> > > > > > -- > -- Rene Rivera > -- Grafik - Don't Assume Anything > -- Robot Dreams - http://robot-dreams.net <http://robot-dreams.net/> > -- rrivera/acm.org > <http://acm.org/> (msn) - grafikrobot/aim,yahoo,skype,efnet,gmail > > > _______________________________________________ > Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build > _______________________________________________ Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build