Unfortunately, I don't have python3 installed on my computer so I never had to 
deal with this.     My only suggestion is to hack the 
"libs/python/build/Jamfile.v2"  file to get it to work.
Sorry I can't be of more help :(

--Liam

From: Cplusplus-sig 
[mailto:cplusplus-sig-bounces+herron=ellington....@python.org] On Behalf Of 
David Aldrich
Sent: Thursday, March 10, 2016 7:21 AM
To: Development of Python/C++ integration
Subject: Re: [C++-sig] Trouble building boost with Visual Studio 2010

Thanks for your reply. I have set my path to start with Python 2.7:

PATH=c:\Python27;C:\Program Files (x86)\Microsoft Visual Studio 
10.0\VSTSDB\Deploy;C:\Program Files (x86)\Microsoft Visual Studio 
10.0\Common7\IDE\;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN; 
etc.

I have created a user-config.jam:

using msvc ;

using python
    : 2.7                   # Version
    : C:\\Python27\\python.exe      # Python Path
    : C:\\Python27\\include         # include path
    : C:\\Python27\\libs            # lib path(s)
    : <define>BOOST_ALL_NO_LIB=1
    ;

I then invoke bjam:

b2 --user-config=user-config.jam toolset=msvc-10.0 --with-python link=shared

but it is still trying to use Python 3.4:

...patience...
...patience...
...found 1927 targets...
...updating 9 targets...
msvc.link.dll 
bin.v2\libs\python\build\msvc-10.0\debug\threading-multi\boost_python-vc100-mt-gd-1_60.dll
LINK : fatal error LNK1104: cannot open file 'python34.lib'

Any thought please why it's still choosing Python 3.4 instead of 2.7 please?

Best regards

David

From: Cplusplus-sig 
[mailto:cplusplus-sig-bounces+david.aldrich=emea.nec....@python.org] On Behalf 
Of Liam Herron
Sent: 09 March 2016 17:03
To: Development of Python/C++ integration <cplusplus-sig@python.org>
Subject: Re: [C++-sig] Trouble building boost with Visual Studio 2010

After you open the cmd shell, just change the PATH for that cmd shell and then 
run the build.

From: Cplusplus-sig 
[mailto:cplusplus-sig-bounces+herron=ellington....@python.org] On Behalf Of 
David Aldrich
Sent: Wednesday, March 09, 2016 11:59 AM
To: Development of Python/C++ integration
Subject: Re: [C++-sig] Trouble building boost with Visual Studio 2010

Ok, thanks. The console defaults to 3.5, which is the problem.

I'll see what I can do.

From: Cplusplus-sig 
[mailto:cplusplus-sig-bounces+david.aldrich=emea.nec....@python.org] On Behalf 
Of Liam Herron
Sent: 09 March 2016 16:52
To: Development of Python/C++ integration 
<cplusplus-sig@python.org<mailto:cplusplus-sig@python.org>>
Subject: Re: [C++-sig] Trouble building boost with Visual Studio 2010

I believe if you don't specify a python directly in the config files, it will 
simply use whatever python it picks up with the "python" cmd.  When you open a 
cmd shell and simply type "python", which version does it run?  If you get this 
to be your 32-bit version, I think it will work. Else, you can muck around with 
the  "jam" files to try to point it to the python version you want.

--Liam

From: Cplusplus-sig 
[mailto:cplusplus-sig-bounces+herron=ellington....@python.org] On Behalf Of 
David Aldrich
Sent: Wednesday, March 09, 2016 11:35 AM
To: Development of Python/C++ integration
Subject: Re: [C++-sig] Trouble building boost with Visual Studio 2010

Hi Liam

I have Python 2.7 (32-bit) and Python 3.4 (64-bit) installed on my Win 10 
system. As you suggested I opened a VS2010 command prompt (I believe 32-bit), 
executed bootstrap and then:

b2 toolset=msvc-10.0 --with-python link=shared

I still see this error:

msvc.link.dll 
bin.v2\libs\python\build\msvc-10.0\release\threading-multi\boost_python-vc100-mt-1_60.dll
python34.lib(python34.dll) : fatal error LNK1112: module machine type 'x64' 
conflicts with target machine type 'X86'

So it seems to be picking up python34.lib in preference to python27.lib

Do you think this just depends on the path order?

David

From: Cplusplus-sig 
[mailto:cplusplus-sig-bounces+david.aldrich=emea.nec....@python.org] On Behalf 
Of Liam Herron
Sent: 09 March 2016 14:40
To: Development of Python/C++ integration 
<cplusplus-sig@python.org<mailto:cplusplus-sig@python.org>>
Subject: Re: [C++-sig] Trouble building boost with Visual Studio 2010

You should open a cmd shell tool that comes with VS :
     e.g. "VS2010 x86 Native Tools Command Prompt"
       or "VS2010 x64 Native Tools Command Prompt"

And then in this shell, run your:

b2 toolset=msvc-10.0 --with-python link=shared

It looks like your python version is 64-bit python (Is that true?) so maybe you 
want to build the 64bit cmd shell that will build the 64 bit version of boost 
and boost python.

If you want the build 32bit version, make sure you have a 32 bit version of 
python and python libs and then use the x86 cmd shell to build the 32 bit 
version of boost and boost python.

Hope that helps.
--Liam


From: Cplusplus-sig 
[mailto:cplusplus-sig-bounces+herron=ellington....@python.org] On Behalf Of 
David Aldrich
Sent: Wednesday, March 09, 2016 5:05 AM
To: Development of Python/C++ integration
Subject: [C++-sig] Trouble building boost with Visual Studio 2010

Hi

I am trying to build Boost 1.60 with Visual Studio 2010 Professional on Windows 
10.

I use the command:

b2 toolset=msvc-10.0 --with-python link=shared

and get the following error:

python34.lib(python34.dll) : fatal error LNK1112: module machine type 'x64' 
conflicts with target machine type 'X86'

I guess this means I have a conflict of 32-bit and 64-bit libraries.  I want to 
target 32-bit (X86).

Do I need to install a 32-bit version of Python?  I wonder if that can co-exist 
with the current version of Python?

Best regards

David


=============================================================================================
Email transmissions can not be guaranteed to be secure or error-free, as 
information could be intercepted, corrupted, lost, destroyed, arrive late or 
incomplete, or contain viruses. The sender therefore does not accept liability 
for any errors or omissions in the contents of this message which arise as a 
result of email transmission. In addition, the information contained in this 
email message is intended only for use of the individual or entity named above. 
If the reader of this message is not the intended recipient, or the employee or 
agent responsible to deliver it to the intended recipient, you are hereby 
notified that any dissemination, distribution,or copying of this communication, 
disclosure of the parties to it, or any action taken or omitted to be taken in 
reliance on it, is strictly prohibited, and may be unlawful. If you are not the 
intended recipient please delete this email message. 
==============================================================================================
   

Click 
here<https://www.mailcontrol.com/sr/VIdq9eIbFJ3GX2PQPOmvUiQSa3+T5MHvzY1DQvi2lw+FqzJbzBJIALiBTIHiUs7caaqy85oZ6mcgL4AI7al!HQ==>
 to report this email as spam.

=============================================================================================
Email transmissions can not be guaranteed to be secure or error-free, as 
information 
could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or 
contain 
viruses.  The sender therefore does not accept liability for any errors or 
omissions in 
the contents of this message which arise as a result of email transmission.  In 
addition,
the information contained in this email message is intended only for use of the 
individual or entity named above.  If the reader of this message is not the 
intended
recipient, or the employee or agent responsible to deliver it to the intended 
recipient,
you are hereby notified that any dissemination, distribution,or copying of this 
communication,
disclosure of the parties to it, or any action taken or omitted to be taken in 
reliance on it,
is strictly prohibited, and may be unlawful.  If you are not the intended 
recipient please
delete this email message. 
==============================================================================================
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
https://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to