Opened 12 years ago

Closed 12 years ago

#4873 closed Bugs (duplicate)

Compile error when building against python 3.x

Reported by: chrislu Owned by: Dave Abrahams
Milestone: To Be Determined Component: python USE GITHUB
Version: Boost 1.45.0 Severity: Problem
Keywords: Cc:

Description

Since version 1.44 boost python does not compile anymore using python 3.x (after a GSOC project it worked fine with python 3.1).

I tried to build the boost 1.45 official release targeting a x64 version on Visual C++ 2010 under Windows 7 x64 using the following build line:

bjam --build-dir=e:\devel\_ext\boost_out_64\out --libdir=e:\devel\_ext\boost_out_64\lib --includedir=e:\devel\_ext\boost_out_64\inc toolset=msvc-10.0 define=arch:SSE2 address-model=64 link=shared runtime-link=shared -j6 install
bjam --build-dir=e:\devel\_ext\boost_out_64\out --libdir=e:\devel\_ext\boost_out_64\lib --includedir=e:\devel\_ext\boost_out_64\inc toolset=msvc-10.0 define=arch:SSE2 address-model=64 link=static runtime-link=shared -j6 install

These are the errors generated:

compile-c-c++ e:\devel\_ext\boost_out_64\out\boost\bin.v2\libs\python\build\msvc-10.0\debug\address-model-64\link-static\threading-multi\numeric.obj
numeric.cpp
E:\devel\boost_1_45_0\boost/python/converter/builtin_converters.hpp(138) : error C2039: 'PyInt_FromLong' : is not a member of '`global namespace''
E:\devel\boost_1_45_0\boost/python/converter/builtin_converters.hpp(138) : error C3861: 'PyInt_FromLong': identifier not found
E:\devel\boost_1_45_0\boost/python/converter/builtin_converters.hpp(138) : error C2065: 'PyInt_Type' : undeclared identifier
E:\devel\boost_1_45_0\boost/python/converter/builtin_converters.hpp(138) : error C2039: 'PyInt_FromLong' : is not a member of '`global namespace''
E:\devel\boost_1_45_0\boost/python/converter/builtin_converters.hpp(138) : error C3861: 'PyInt_FromLong': identifier not found
E:\devel\boost_1_45_0\boost/python/converter/builtin_converters.hpp(138) : error C2065: 'PyInt_Type' : undeclared identifier
E:\devel\boost_1_45_0\boost/python/converter/builtin_converters.hpp(138) : error C2039: 'PyInt_FromLong' : is not a member of '`global namespace''
E:\devel\boost_1_45_0\boost/python/converter/builtin_converters.hpp(138) : error C3861: 'PyInt_FromLong': identifier not found
E:\devel\boost_1_45_0\boost/python/converter/builtin_converters.hpp(144) : error C2039: 'PyInt_FromLong' : is not a member of '`global namespace''
E:\devel\boost_1_45_0\boost/python/converter/builtin_converters.hpp(144) : error C3861: 'PyInt_FromLong': identifier not found
E:\devel\boost_1_45_0\boost/python/converter/builtin_converters.hpp(144) : error C2065: 'PyInt_Type' : undeclared identifier
E:\devel\boost_1_45_0\boost/python/converter/builtin_converters.hpp(144) : error C2039: 'PyInt_FromLong' : is not a member of '`global namespace''
E:\devel\boost_1_45_0\boost/python/converter/builtin_converters.hpp(144) : error C3861: 'PyInt_FromLong': identifier not found
E:\devel\boost_1_45_0\boost/python/converter/builtin_converters.hpp(144) : error C2065: 'PyInt_Type' : undeclared identifier
E:\devel\boost_1_45_0\boost/python/converter/builtin_converters.hpp(144) : error C2039: 'PyInt_FromLong' : is not a member of '`global namespace''
E:\devel\boost_1_45_0\boost/python/converter/builtin_converters.hpp(144) : error C3861: 'PyInt_FromLong': identifier not found
E:\devel\boost_1_45_0\boost/python/detail/caller.hpp(55) : warning C4244: 'return' : conversion from 'Py_ssize_t' to 'unsigned int', possible loss of data

Change History (3)

comment:1 by Dave Abrahams, 12 years ago

Component: Building BoostPython
Owner: set to Dave Abrahams

comment:2 by Dave Abrahams, 12 years ago

Summary: [pyhon] compile error when building against python 3.xCompile error when building against python 3.x

comment:3 by Matthew Bradbury <matt-bradbury@…>, 12 years ago

Keywords: python removed
Resolution: duplicate
Status: newclosed

Duplicate of #4627.

Note: See TracTickets for help on using tickets.