From gfalcon at google.com Fri Mar 4 13:45:51 2016 From: gfalcon at google.com (Greg Falcon) Date: Fri, 4 Mar 2016 13:45:51 -0500 Subject: [C++-sig] Problem with and fix for automatic pointer registration in Boost.Python 1.60 Message-ID: Boost.Python 1.60 has a bug, introducing an incompatibility from 1.59, and first noted on this mailing list on January 11. What has changed is that a class declaration of the form class_>("Foo"); will no longer automatically register a converter for the shared_ptr wrapper. This is not an intentional change, but a bug exposed by a change to Boost.MPL. The template metaprogramming in class_metadata.hpp makes assumptions about the types used in Boost.MPL that are no longer true. I have posted a fix to this issue at https://github.com/boostorg/python/pull/59/files, which at least solves the problem for us. This patch, when applied against 1.60, fixes pointer registration. It can also be applied to 1.59 without issue. If someone on this list could take a look at this change, I'd appreciate it. Let me know if you have any questions. Thanks, Greg Falcon -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan at seefeld.name Sun Mar 6 13:03:29 2016 From: stefan at seefeld.name (Stefan Seefeld) Date: Sun, 6 Mar 2016 13:03:29 -0500 Subject: [C++-sig] Problem with and fix for automatic pointer registration in Boost.Python 1.60 In-Reply-To: References: Message-ID: <56DC70F1.9070601@seefeld.name> On 04.03.2016 13:45, Greg Falcon via Cplusplus-sig wrote: > Boost.Python 1.60 has a bug, introducing an incompatibility from 1.59, > and first noted on this mailing list on January 11. What has changed > is that a class declaration of the form > > class_>("Foo"); > > will no longer automatically register a converter for the shared_ptr > wrapper. > > This is not an intentional change, but a bug exposed by a change to > Boost.MPL. The template metaprogramming in class_metadata.hpp makes > assumptions about the types used in Boost.MPL that are no longer true. > > I have posted a fix to this issue > at https://github.com/boostorg/python/pull/59/files, which at least > solves the problem for us. This patch, when applied against 1.60, > fixes pointer registration. It can also be applied to 1.59 without issue. > > If someone on this list could take a look at this change, I'd > appreciate it. Let me know if you have any questions. I have merged the PR, and will try to get it into master for the 1.61 release. Sorry this took so long. Stefan > > Thanks, > Greg Falcon > > > > _______________________________________________ > Cplusplus-sig mailing list > Cplusplus-sig at python.org > https://mail.python.org/mailman/listinfo/cplusplus-sig -- ...ich hab' noch einen Koffer in Berlin... From trigves at yahoo.com Tue Mar 8 06:33:17 2016 From: trigves at yahoo.com (Trigve Siver) Date: Tue, 8 Mar 2016 11:33:17 +0000 (UTC) Subject: [C++-sig] Problem with and fix for automatic pointer registration in Boost.Python 1.60 In-Reply-To: <56DC70F1.9070601@seefeld.name> References: <56DC70F1.9070601@seefeld.name> Message-ID: <1460374656.4529511.1457436797283.JavaMail.yahoo@mail.yahoo.com> >________________________________ > From: Stefan Seefeld >To: cplusplus-sig at python.org >Sent: Sunday, March 6, 2016 7:03 PM >Subject: Re: [C++-sig] Problem with and fix for automatic pointer registration in Boost.Python 1.60 > > >On 04.03.2016 13:45, Greg Falcon via Cplusplus-sig wrote: >> Boost.Python 1.60 has a bug, introducing an incompatibility from 1.59, >> and first noted on this mailing list on January 11. What has changed >> is that a class declaration of the form >> >> class_>("Foo"); >> >> will no longer automatically register a converter for the shared_ptr >> wrapper. >> >> This is not an intentional change, but a bug exposed by a change to >> Boost.MPL. The template metaprogramming in class_metadata.hpp makes >> assumptions about the types used in Boost.MPL that are no longer true. >> >> I have posted a fix to this issue >> at https://github.com/boostorg/python/pull/59/files, which at least >> solves the problem for us. This patch, when applied against 1.60, >> fixes pointer registration. It can also be applied to 1.59 without issue. >> >> If someone on this list could take a look at this change, I'd >> appreciate it. Let me know if you have any questions. > >I have merged the PR, and will try to get it into master for the 1.61 >release. Sorry this took so long. > Stefan > Shouldn't there be a note (+ a patch) in a release document (1.60), also? Because this bug looks like showstopper to me. Thanks -- Trigve From David.Aldrich at EMEA.NEC.COM Wed Mar 9 05:04:48 2016 From: David.Aldrich at EMEA.NEC.COM (David Aldrich) Date: Wed, 9 Mar 2016 10:04:48 +0000 Subject: [C++-sig] Trouble building boost with Visual Studio 2010 Message-ID: <41302A7145AC054FA7A96CFD03835A0A0BAA9F05@EX10MBX02.EU.NEC.COM> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan at seefeld.name Wed Mar 9 07:38:09 2016 From: stefan at seefeld.name (Stefan Seefeld) Date: Wed, 9 Mar 2016 07:38:09 -0500 Subject: [C++-sig] Trouble building boost with Visual Studio 2010 In-Reply-To: <41302A7145AC054FA7A96CFD03835A0A0BAA9F05@EX10MBX02.EU.NEC.COM> References: <41302A7145AC054FA7A96CFD03835A0A0BAA9F05@EX10MBX02.EU.NEC.COM> Message-ID: <56E01931.9030906@seefeld.name> Hi David, On 09.03.2016 05:04, David Aldrich wrote: > > 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' > Just a quick guess: is it possible that your "libpython34.dll" file is a 64-bit binary, when the command really requires it to be a 32-bit binary ? > > > 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? > I'm unfortunately unable to answer your question, as the question seems more about the build system than Boost.Python itself. Therefore I'm including the Boost mailing list in my reply, hoping that some Boost.Build expert may be able to help. Regards, Stefan > > > Best regards > > > > David > > > > > > _______________________________________________ > Cplusplus-sig mailing list > Cplusplus-sig at python.org > https://mail.python.org/mailman/listinfo/cplusplus-sig -- ...ich hab' noch einen Koffer in Berlin... From herron at ELLINGTON.com Wed Mar 9 09:39:59 2016 From: herron at ELLINGTON.com (Liam Herron) Date: Wed, 9 Mar 2016 14:39:59 +0000 Subject: [C++-sig] Trouble building boost with Visual Studio 2010 In-Reply-To: <41302A7145AC054FA7A96CFD03835A0A0BAA9F05@EX10MBX02.EU.NEC.COM> References: <41302A7145AC054FA7A96CFD03835A0A0BAA9F05@EX10MBX02.EU.NEC.COM> Message-ID: <96426055F003C542B3FB8A0928736DF9023A6874C2@ex0.ELLINGTON.com> 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.com at 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. ============================================================================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: From David.Aldrich at EMEA.NEC.COM Wed Mar 9 09:11:51 2016 From: David.Aldrich at EMEA.NEC.COM (David Aldrich) Date: Wed, 9 Mar 2016 14:11:51 +0000 Subject: [C++-sig] Trouble building boost with Visual Studio 2010 In-Reply-To: <56E01931.9030906@seefeld.name> References: <41302A7145AC054FA7A96CFD03835A0A0BAA9F05@EX10MBX02.EU.NEC.COM> <56E01931.9030906@seefeld.name> Message-ID: <41302A7145AC054FA7A96CFD03835A0A0BAAA172@EX10MBX02.EU.NEC.COM> > Just a quick guess: is it possible that your "libpython34.dll" file is a 64-bit > binary, when the command really requires it to be a 32-bit binary ? > > I'm unfortunately unable to answer your question, as the question seems more > about the build system than Boost.Python itself. > Therefore I'm including the Boost mailing list in my reply, hoping that some > Boost.Build expert may be able to help. Hi Stefan Thanks for your reply. I haven't seen your replied message to the other group so I've forwarded my original message to boost-users. Best regards David From David.Aldrich at EMEA.NEC.COM Wed Mar 9 11:34:48 2016 From: David.Aldrich at EMEA.NEC.COM (David Aldrich) Date: Wed, 9 Mar 2016 16:34:48 +0000 Subject: [C++-sig] Trouble building boost with Visual Studio 2010 In-Reply-To: <96426055F003C542B3FB8A0928736DF9023A6874C2@ex0.ELLINGTON.com> References: <41302A7145AC054FA7A96CFD03835A0A0BAA9F05@EX10MBX02.EU.NEC.COM> <96426055F003C542B3FB8A0928736DF9023A6874C2@ex0.ELLINGTON.com> Message-ID: <41302A7145AC054FA7A96CFD03835A0A0BAAA437@EX10MBX02.EU.NEC.COM> 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.com at python.org] On Behalf Of Liam Herron Sent: 09 March 2016 14:40 To: Development of Python/C++ integration 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.com at 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 to report this email as spam. -------------- next part -------------- An HTML attachment was scrubbed... URL: From herron at ELLINGTON.com Wed Mar 9 11:51:33 2016 From: herron at ELLINGTON.com (Liam Herron) Date: Wed, 9 Mar 2016 16:51:33 +0000 Subject: [C++-sig] Trouble building boost with Visual Studio 2010 In-Reply-To: <41302A7145AC054FA7A96CFD03835A0A0BAAA437@EX10MBX02.EU.NEC.COM> References: <41302A7145AC054FA7A96CFD03835A0A0BAA9F05@EX10MBX02.EU.NEC.COM> <96426055F003C542B3FB8A0928736DF9023A6874C2@ex0.ELLINGTON.com> <41302A7145AC054FA7A96CFD03835A0A0BAAA437@EX10MBX02.EU.NEC.COM> Message-ID: <96426055F003C542B3FB8A0928736DF9023A68758A@ex0.ELLINGTON.com> 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.com at 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.com at python.org] On Behalf Of Liam Herron Sent: 09 March 2016 14:40 To: Development of Python/C++ integration 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.com at 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 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. ============================================================================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: From David.Aldrich at EMEA.NEC.COM Wed Mar 9 11:58:33 2016 From: David.Aldrich at EMEA.NEC.COM (David Aldrich) Date: Wed, 9 Mar 2016 16:58:33 +0000 Subject: [C++-sig] Trouble building boost with Visual Studio 2010 In-Reply-To: <96426055F003C542B3FB8A0928736DF9023A68758A@ex0.ELLINGTON.com> References: <41302A7145AC054FA7A96CFD03835A0A0BAA9F05@EX10MBX02.EU.NEC.COM> <96426055F003C542B3FB8A0928736DF9023A6874C2@ex0.ELLINGTON.com> <41302A7145AC054FA7A96CFD03835A0A0BAAA437@EX10MBX02.EU.NEC.COM> <96426055F003C542B3FB8A0928736DF9023A68758A@ex0.ELLINGTON.com> Message-ID: <41302A7145AC054FA7A96CFD03835A0A0BAAA4A5@EX10MBX02.EU.NEC.COM> 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.com at python.org] On Behalf Of Liam Herron Sent: 09 March 2016 16:52 To: Development of Python/C++ integration 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.com at 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.com at python.org] On Behalf Of Liam Herron Sent: 09 March 2016 14:40 To: Development of Python/C++ integration > 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.com at 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 to report this email as spam. -------------- next part -------------- An HTML attachment was scrubbed... URL: From herron at ELLINGTON.com Wed Mar 9 12:03:27 2016 From: herron at ELLINGTON.com (Liam Herron) Date: Wed, 9 Mar 2016 17:03:27 +0000 Subject: [C++-sig] Trouble building boost with Visual Studio 2010 In-Reply-To: <41302A7145AC054FA7A96CFD03835A0A0BAAA4A5@EX10MBX02.EU.NEC.COM> References: <41302A7145AC054FA7A96CFD03835A0A0BAA9F05@EX10MBX02.EU.NEC.COM> <96426055F003C542B3FB8A0928736DF9023A6874C2@ex0.ELLINGTON.com> <41302A7145AC054FA7A96CFD03835A0A0BAAA437@EX10MBX02.EU.NEC.COM> <96426055F003C542B3FB8A0928736DF9023A68758A@ex0.ELLINGTON.com> <41302A7145AC054FA7A96CFD03835A0A0BAAA4A5@EX10MBX02.EU.NEC.COM> Message-ID: <96426055F003C542B3FB8A0928736DF9023A6875EB@ex0.ELLINGTON.com> 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.com at 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.com at python.org] On Behalf Of Liam Herron Sent: 09 March 2016 16:52 To: Development of Python/C++ integration 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.com at 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.com at python.org] On Behalf Of Liam Herron Sent: 09 March 2016 14:40 To: Development of Python/C++ integration > 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.com at 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 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. ============================================================================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: From David.Aldrich at EMEA.NEC.COM Thu Mar 10 07:21:21 2016 From: David.Aldrich at EMEA.NEC.COM (David Aldrich) Date: Thu, 10 Mar 2016 12:21:21 +0000 Subject: [C++-sig] Trouble building boost with Visual Studio 2010 In-Reply-To: <96426055F003C542B3FB8A0928736DF9023A6875EB@ex0.ELLINGTON.com> References: <41302A7145AC054FA7A96CFD03835A0A0BAA9F05@EX10MBX02.EU.NEC.COM> <96426055F003C542B3FB8A0928736DF9023A6874C2@ex0.ELLINGTON.com> <41302A7145AC054FA7A96CFD03835A0A0BAAA437@EX10MBX02.EU.NEC.COM> <96426055F003C542B3FB8A0928736DF9023A68758A@ex0.ELLINGTON.com> <41302A7145AC054FA7A96CFD03835A0A0BAAA4A5@EX10MBX02.EU.NEC.COM> <96426055F003C542B3FB8A0928736DF9023A6875EB@ex0.ELLINGTON.com> Message-ID: <41302A7145AC054FA7A96CFD03835A0A0BAAAA28@EX10MBX02.EU.NEC.COM> 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) : 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.com at python.org] On Behalf Of Liam Herron Sent: 09 March 2016 17:03 To: Development of Python/C++ integration 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.com at 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.com at python.org] On Behalf Of Liam Herron Sent: 09 March 2016 16:52 To: Development of Python/C++ integration > 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.com at 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.com at python.org] On Behalf Of Liam Herron Sent: 09 March 2016 14:40 To: Development of Python/C++ integration > 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.com at 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 to report this email as spam. -------------- next part -------------- An HTML attachment was scrubbed... URL: From herron at ELLINGTON.com Thu Mar 10 10:39:12 2016 From: herron at ELLINGTON.com (Liam Herron) Date: Thu, 10 Mar 2016 15:39:12 +0000 Subject: [C++-sig] Trouble building boost with Visual Studio 2010 In-Reply-To: <41302A7145AC054FA7A96CFD03835A0A0BAAAA28@EX10MBX02.EU.NEC.COM> References: <41302A7145AC054FA7A96CFD03835A0A0BAA9F05@EX10MBX02.EU.NEC.COM> <96426055F003C542B3FB8A0928736DF9023A6874C2@ex0.ELLINGTON.com> <41302A7145AC054FA7A96CFD03835A0A0BAAA437@EX10MBX02.EU.NEC.COM> <96426055F003C542B3FB8A0928736DF9023A68758A@ex0.ELLINGTON.com> <41302A7145AC054FA7A96CFD03835A0A0BAAA4A5@EX10MBX02.EU.NEC.COM> <96426055F003C542B3FB8A0928736DF9023A6875EB@ex0.ELLINGTON.com> <41302A7145AC054FA7A96CFD03835A0A0BAAAA28@EX10MBX02.EU.NEC.COM> Message-ID: <96426055F003C542B3FB8A0928736DF9023A687BE1@ex0.ELLINGTON.com> 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.com at 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) : 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.com at python.org] On Behalf Of Liam Herron Sent: 09 March 2016 17:03 To: Development of Python/C++ integration 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.com at 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.com at python.org] On Behalf Of Liam Herron Sent: 09 March 2016 16:52 To: Development of Python/C++ integration > 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.com at 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.com at python.org] On Behalf Of Liam Herron Sent: 09 March 2016 14:40 To: Development of Python/C++ integration > 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.com at 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 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. ============================================================================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: From David.Aldrich at EMEA.NEC.COM Thu Mar 10 10:54:47 2016 From: David.Aldrich at EMEA.NEC.COM (David Aldrich) Date: Thu, 10 Mar 2016 15:54:47 +0000 Subject: [C++-sig] Trouble building boost with Visual Studio 2010 In-Reply-To: <96426055F003C542B3FB8A0928736DF9023A687BE1@ex0.ELLINGTON.com> References: <41302A7145AC054FA7A96CFD03835A0A0BAA9F05@EX10MBX02.EU.NEC.COM> <96426055F003C542B3FB8A0928736DF9023A6874C2@ex0.ELLINGTON.com> <41302A7145AC054FA7A96CFD03835A0A0BAAA437@EX10MBX02.EU.NEC.COM> <96426055F003C542B3FB8A0928736DF9023A68758A@ex0.ELLINGTON.com> <41302A7145AC054FA7A96CFD03835A0A0BAAA4A5@EX10MBX02.EU.NEC.COM> <96426055F003C542B3FB8A0928736DF9023A6875EB@ex0.ELLINGTON.com> <41302A7145AC054FA7A96CFD03835A0A0BAAAA28@EX10MBX02.EU.NEC.COM> <96426055F003C542B3FB8A0928736DF9023A687BE1@ex0.ELLINGTON.com> Message-ID: <41302A7145AC054FA7A96CFD03835A0A0BAAAC39@EX10MBX02.EU.NEC.COM> Hi Liam Thanks for your reply and help. I'm going to try using the pre-built libraries instead. Best regards David From: Cplusplus-sig [mailto:cplusplus-sig-bounces+david.aldrich=emea.nec.com at python.org] On Behalf Of Liam Herron Sent: 10 March 2016 15:39 To: Development of Python/C++ integration Subject: Re: [C++-sig] Trouble building boost with Visual Studio 2010 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.com at 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) : 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.com at python.org] On Behalf Of Liam Herron Sent: 09 March 2016 17:03 To: Development of Python/C++ integration > 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.com at 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.com at python.org] On Behalf Of Liam Herron Sent: 09 March 2016 16:52 To: Development of Python/C++ integration > 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.com at 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.com at python.org] On Behalf Of Liam Herron Sent: 09 March 2016 14:40 To: Development of Python/C++ integration > 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.com at 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 to report this email as spam. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mlang at delysid.org Mon Mar 14 12:18:15 2016 From: mlang at delysid.org (Mario Lang) Date: Mon, 14 Mar 2016 17:18:15 +0100 Subject: [C++-sig] variant_adaptor Message-ID: <871t7d9goo.fsf@fx.delysid.org> Hi. While I haven't really found a way to get reference semantics (hints appreciated), I have now made my discoveries from https://blind.guru/boost_python-and-boost_variant.html into a handy little utility class. This is the best I was able to figure out regarding integration of boost::python with boost::variant. I was hoping to be able to utilize some sort of custom instance_holder, but it seems the library forces me to declare the C++ type for the object held. This prevents me from using a visitor to create the python object at runtime. I would basically need something that returns a boost::python::object, not a concrete C++ type. I haven't found that in the docs/code so far. The best I could find was to_python_converter, but that (at least to me) seems limited to copy semantics. Any hint on how to improve the helper below is very welcome. Maybe someone finds it useful. There seems to be virtually nothing on the Net about this topic. ------ #if !defined(MLANG_PYTHON_VARIANT_ADAPTOR_HPP) #define MLANG_PYTHON_VARIANT_ADAPTOR_HPP #include #include #include #include namespace mlang { namespace python { template struct variant_adaptor { variant_adaptor() { boost::python::to_python_converter{}; register_convertibles::apply(); } template struct register_convertibles; template struct register_convertibles> { static void apply() { boost::python::implicitly_convertible(); } }; template struct register_convertibles> { static void apply() { boost::python::implicitly_convertible(); register_convertibles>::apply(); } }; static PyObject *convert(Variant const &v) { return apply_visitor(to_python{}, v); } struct to_python : boost::static_visitor { template result_type operator()(T const &t) const { return boost::python::incref(boost::python::object(t).ptr()); } }; }; } // namespace python } // namespace mlang #endif // !defined(MLANG_PYTHON_VARIANT_ADAPTOR_HPP) ------ A small usage example would be: #include #include #include #include #include #include #include "variant_adaptor.hpp" #include struct a { int x; }; struct b { std::string y; }; bool operator==(a const &lhs, a const &rhs) { return lhs.x == rhs.x; } bool operator==(b const &lhs, b const &rhs) { return lhs.y == rhs.y; } typedef boost::variant variant; typedef std::vector vector; variant make_variant() { return variant(); } vector make_vector() { return vector{a(), b(), a()}; } BOOST_PYTHON_MODULE(bpva) { using namespace boost::python; // Define classes for all variant member types class_("a", init()).def(init<>()).def_readwrite("x", &a::x); class_("b", init()).def(init<>()).def_readwrite("y", &b::y); mlang::python::variant_adaptor{}; class_("vector").def(vector_indexing_suite()); def("make_variant", make_variant); def("make_vector", make_vector); } As described in the blog post above, the resulting Python module does work, but it does not allow to assign to members of a container element. Replacing a container element with a new one does work though. So while the Python behaviour is a bit unexpected, it is likely OKish for most use cases. I wonder if I am * missing an obvious technique to get this right, OR * hitting a fundamental limitation of Boost.Python, OR * hitting a fundamental limitation of value semantics vs. dynamic languages? -- CYa, ????? From jloy at pixar.com Wed Mar 16 17:04:35 2016 From: jloy at pixar.com (John Loy) Date: Wed, 16 Mar 2016 14:04:35 -0700 Subject: [C++-sig] Module import / type registration performance Message-ID: <56E9CA63.5010103@pixar.com> Hi Everyone, I recently opened a pull request for a pair of changes to improve the time and memory costs when registering types and I'd like to also solicit feedback from the list. https://github.com/boostorg/python/pull/62 The brief summary is that there are a couple of places in the inheritance registration code that scale as O(N^2). For us, N has become large enough that Boost Python is showing up in our internal performance profiles during module imports. The larger of the two changes (b565ac4) switches the smart_graph structures to use a sparse representation. The original smart_graph behaves nicely when N is small and the graph is dense, but as N becomes large, the cost of initializing the table becomes significant. The sparse representation cuts memory usage from hundreds of megabytes down to tens of kilobytes. The second change (e1d2da5) is for those of us using standard libraries that implement std::list::size() in O(N) time, which results in num_edges on our graph also being in O(N). Adding casts is effectively quadratic due to the repeated calls to num_edges. Combined, these changes save ~400ms of application startup time on a 2.3GHz Haswell Xeon. Let me know if you have any questions or concerns, especially if you have performance targets that might be affected by these changes. John From orangesherbet0 at gmail.com Tue Mar 22 12:51:29 2016 From: orangesherbet0 at gmail.com (Joey Ortiz) Date: Tue, 22 Mar 2016 10:51:29 -0600 Subject: [C++-sig] Building Boost Python Tutorial Linker Errors Message-ID: Hello, I have spent the past week trying to build the boost python tutorial, only to be stopped by numerous linker errors. I have posted my question on http://stackoverflow.com/questions/36143494/linker-errors-running-bjam-on-boost-python-tutorial My system runs Windows 10, Visual Studio 2015 (msvc 14.0), Anaconda 32bit, Anaconda 64bit, and regular default-installed Python 2.7, and the Boost 1.60.0 libraries (I have tried both 32-bit and 64-bit builds). I first build my Boost libraries in either 32-bit (bootstrap, b2) or 64-bit (bootstrap, b2 address-model=64), using the instructions at http://www.boost.org/doc/libs/1_60_0/more/getting_started/windows.html I then follow the most recent boost.python tutorial at http://www.boost.org/doc/libs/1_60_0/libs/python/doc/html/tutorial/tutorial/hello.html (which by the way needs serious work). I have tried combinations of the following build instructions and msvc / python settings. bjam bjam address-model=64 bjam address-model=64 architecture=x86 using msvc : 14.0 ; using msvc : 14.0 : "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin" ; using msvc ; using python ; using python : 2.7 ; using python : 2.7 : C:/Users/Joey/Anaconda2 ; using python : 2.7 : "C:/Users/Joey/Anaconda2 (32-bit)" ; using python : 2.7 # Version : C:\\Users\\Joey\\Anaconda2\\python.exe # Python Path : C:\\Users\\Joey\\Anaconda2\\include # include path : C:\\Users\\Joey\\Anaconda2\\libs # lib path(s) : BOOST_ALL_NO_LIB=1 ; In any setting, when I run "bjam" I get the following output: Performing configuration checks - 32-bit : yes (cached) - arm : no (cached) - mips1 : no (cached) - power : no (cached) - sparc : no (cached) - x86 : yes (cached) ...found 7 targets... - symlinks supported : yes ...found 1 target... ...updating 1 target... config-cache.write bin\project-cache.jam ...updated 1 target... ...patience... ...patience... ...found 1917 targets... ...updating 9 targets... msvc.link.dll ..\..\..\..\bin.v2\libs\python\build\msvc-14.0\debug\threading-multi\boost_python-vc140-mt-gd-1_60.dll Creating library ..\..\..\..\bin.v2\libs\python\build\msvc-14.0\debug\threading-multi\boost_python-vc140-mt-gd-1_60.lib and object ..\..\..\..\bin.v2\libs\python\build\msvc-14.0\debug\threading-multi\boost_python-vc140-mt-gd-1_60.exp object_protocol.obj : error LNK2001: unresolved external symbol __imp__PyObject_GetAttrString wrapper.obj : error LNK2001: unresolved external symbol __imp__PyObject_GetAttrString numeric.obj : error LNK2001: unresolved external symbol __imp__PyObject_GetAttrString enum.obj : error LNK2001: unresolved external symbol __imp__PyObject_GetAttrString class.obj : error LNK2001: unresolved external symbol __imp__PyObject_GetAttrString function.obj : error LNK2001: unresolved external symbol __imp__PyObject_GetAttrString numeric.obj : error LNK2019: unresolved external symbol __imp__PyCallable_Check referenced in function "bool __cdecl boost::python::numeric::`anonymous namespace'::load(bool)" (?load@?A0xc5ed2080 at numeric@python at boost@@YA_N_N at Z) class.obj : error LNK2001: unresolved external symbol __imp__PyCallable_Check function.obj : error LNK2001: unresolved external symbol __imp__PyInt_FromLong function_doc_signature.obj : error LNK2001: unresolved external symbol __imp__PyInt_FromLong numeric.obj : error LNK2001: unresolved external symbol __imp__PyInt_FromLong list.obj : error LNK2001: unresolved external symbol __imp__PyInt_FromLong enum.obj : error LNK2001: unresolved external symbol __imp__PyInt_FromLong class.obj : error LNK2001: unresolved external symbol __imp__PyInt_FromLong numeric.obj : error LNK2019: unresolved external symbol __imp__PyBool_FromLong referenced in function "public: __thiscall boost::python::converter::arg_to_python::arg_to_python(bool const &)" (??0?$arg_to_python at _N@converter at python@boost@@QAE at AB_N@Z) class.obj : error LNK2001: unresolved external symbol __imp__PyBool_FromLong numeric.obj : error LNK2019: unresolved external symbol __imp__PyString_FromStringAndSize referenced in function "public: __thiscall boost::python::converter::arg_to_python,class std::allocator > >::arg_to_python,class std::allocator > >(class std::basic_string,class std::allocator > const &)" (??0?$arg_to_python at V?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@@converter at python@boost@@QAE at ABV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@@Z) str.obj : error LNK2001: unresolved external symbol __imp__PyString_FromStringAndSize builtin_converters.obj : error LNK2001: unresolved external symbol __imp__PyString_FromStringAndSize function_doc_signature.obj : error LNK2001: unresolved external symbol __imp__PyString_FromStringAndSize numeric.obj : error LNK2019: unresolved external symbol __imp__PyErr_Clear referenced in function "bool __cdecl boost::python::numeric::`anonymous namespace'::load(bool)" (?load@?A0xc5ed2080 at numeric@python at boost@@YA_N_N at Z) class.obj : error LNK2001: unresolved external symbol __imp__PyErr_Clear function.obj : error LNK2001: unresolved external symbol __imp__PyErr_Clear object_protocol.obj : error LNK2001: unresolved external symbol __imp__PyErr_Clear function.obj : error LNK2001: unresolved external symbol __imp__PyErr_Format numeric.obj : error LNK2001: unresolved external symbol __imp__PyErr_Format from_python.obj : error LNK2001: unresolved external symbol __imp__PyErr_Format registry.obj : error LNK2001: unresolved external symbol __imp__PyErr_Format class.obj : error LNK2001: unresolved external symbol __imp__PyErr_Format enum.obj : error LNK2001: unresolved external symbol __imp__PyEval_CallFunction class.obj : error LNK2001: unresolved external symbol __imp__PyEval_CallFunction pickle_support.obj : error LNK2001: unresolved external symbol __imp__PyEval_CallFunction stl_iterator.obj : error LNK2001: unresolved external symbol __imp__PyEval_CallFunction numeric.obj : error LNK2001: unresolved external symbol __imp__PyEval_CallFunction list.obj : error LNK2001: unresolved external symbol __imp__PyEval_CallFunction dict.obj : error LNK2001: unresolved external symbol __imp__PyEval_CallFunction str.obj : error LNK2001: unresolved external symbol __imp__PyEval_CallFunction numeric.obj : error LNK2019: unresolved external symbol __imp__PyImport_Import referenced in function "bool __cdecl boost::python::numeric::`anonymous namespace'::load(bool)" (?load@?A0xc5ed2080 at numeric@python at boost@@YA_N_N at Z) numeric.obj : error LNK2019: unresolved external symbol __imp__PyObject_IsInstance referenced in function "public: static bool __cdecl boost::python::numeric::aux::array_object_manager_traits::check(struct _object *)" (?check at array_object_manager_traits@aux at numeric@python at boost@@SA_NPAU_object@@@Z) from_python.obj : error LNK2001: unresolved external symbol __imp__PyObject_IsInstance class.obj : error LNK2001: unresolved external symbol __imp__PyObject_IsInstance wrapper.obj : error LNK2001: unresolved external symbol __imp___Py_NoneStruct import.obj : error LNK2001: unresolved external symbol __imp___Py_NoneStruct exec.obj : error LNK2001: unresolved external symbol __imp___Py_NoneStruct function_doc_signature.obj : error LNK2001: unresolved external symbol __imp___Py_NoneStruct iterator.obj : error LNK2001: unresolved external symbol __imp___Py_NoneStruct stl_iterator.obj : error LNK2001: unresolved external symbol __imp___Py_NoneStruct object_protocol.obj : error LNK2001: unresolved external symbol __imp___Py_NoneStruct object_operators.obj : error LNK2001: unresolved external symbol __imp___Py_NoneStruct life_support.obj : error LNK2001: unresolved external symbol __imp___Py_NoneStruct pickle_support.obj : error LNK2001: unresolved external symbol __imp___Py_NoneStruct module.obj : error LNK2001: unresolved external symbol __imp___Py_NoneStruct builtin_converters.obj : error LNK2001: unresolved external symbol __imp___Py_NoneStruct registry.obj : error LNK2001: unresolved external symbol __imp___Py_NoneStruct enum.obj : error LNK2001: unresolved external symbol __imp___Py_NoneStruct class.obj : error LNK2001: unresolved external symbol __imp___Py_NoneStruct function.obj : error LNK2001: unresolved external symbol __imp___Py_NoneStruct tuple.obj : error LNK2001: unresolved external symbol __imp___Py_NoneStruct str.obj : error LNK2001: unresolved external symbol __imp___Py_NoneStruct slice.obj : error LNK2001: unresolved external symbol __imp___Py_NoneStruct from_python.obj : error LNK2001: unresolved external symbol __imp___Py_NoneStruct numeric.obj : error LNK2001: unresolved external symbol __imp___Py_NoneStruct list.obj : error LNK2001: unresolved external symbol __imp___Py_NoneStruct long.obj : error LNK2001: unresolved external symbol __imp___Py_NoneStruct dict.obj : error LNK2001: unresolved external symbol __imp___Py_NoneStruct numeric.obj : error LNK2001: unresolved external symbol __imp__PyExc_ImportError list.obj : error LNK2019: unresolved external symbol __imp__PyInt_AsLong referenced in function "public: int __thiscall boost::python::detail::list_base::count(class boost::python::api::object const &)const " (?count at list_base@detail at python@boost@@QBEHABVobject at api@34@@Z) str.obj : error LNK2001: unresolved external symbol __imp__PyInt_AsLong class.obj : error LNK2001: unresolved external symbol __imp__PyInt_AsLong builtin_converters.obj : error LNK2001: unresolved external symbol __imp__PyInt_AsLong list.obj : error LNK2019: unresolved external symbol __imp__PyList_New referenced in function "protected: __thiscall boost::python::detail::list_base::list_base(void)" (??0list_base at detail@python at boost@@IAE at XZ) list.obj : error LNK2019: unresolved external symbol __imp__PyList_Insert referenced in function "public: void __thiscall boost::python::detail::list_base::insert(int,class boost::python::api::object const &)" (?insert at list_base@detail at python@boost@@QAEXHABVobject at api@34@@Z) list.obj : error LNK2019: unresolved external symbol __imp__PyList_Append referenced in function "public: void __thiscall .... ....(too many to put here) .... object_operators.obj : error LNK2019: unresolved external symbol __imp__PyNumber_Add referenced in function "class boost::python::api::object __cdecl boost::python::api::operator+(class boost::python::api::object const &,class boost::python::api::object const &)" (??Hapi at python@boost@@YA?AVobject at 012@ABV3012 at 0@Z) object_operators.obj : error LNK2019: unresolved external symbol __imp__PyNumber_Subtract referenced in function "class boost::python::api::object __cdecl boost::python::api::operator-(class boost::python::api::object const &,class boost::python::api::object const &)" (??Gapi at python@boost@@YA?AVobject at 012@ABV3012 at 0@Z) object_operators.obj : error LNK2019: unresolved external symbol __imp__PyNumber_Multiply referenced in function "class boost::python::api::object __cdecl boost::python::api::operator*(class boost::python::api::object const &,class boost::python::api::object const &)" (??Dapi at python@boost@@YA?AVobject at 012@ABV3012 at 0@Z) object_operators.obj : error LNK2019: unresolved external symbol __imp__PyNumber_Divide referenced in function "class boost::python::api::object __cdecl boost::python::api::operator/(class boost::python::api::object const &,class boost::python::api::object const &)" (??Kapi at python@boost@@YA?AVobject at 012@ABV3012 at 0@Z) object_operators.obj : error LNK2019: unresolved external symbol __imp__PyNumber_Remainder referenced in function "class boost::python::api::object __cdecl boost::python::api::operator%(class boost::python::api::object const &,class boost::python::api::object const &)" (??Lapi at python@boost@@YA?AVobject at 012@ABV3012 at 0@Z) object_operators.obj : error LNK2019: unresolved external symbol __imp__PyNumber_Lshift referenced in function "class boost::python::api::object __cdecl boost::python::api::operator<<(class boost::python::api::object const &,class boost::python::api::object const &)" (??6api at python@boost@@YA?AVobject at 012@ABV3012 at 0@Z) object_operators.obj : error LNK2019: unresolved external symbol __imp__PyNumber_Rshift referenced in function "class boost::python::api::object __cdecl boost::python::api::operator>>(class boost::python::api::object const &,class boost::python::api::object const &)" (??5api at python@boost@@YA?AVobject at 012@ABV3012 at 0@Z) object_operators.obj : error LNK2019: unresolved external symbol __imp__PyNumber_And referenced in function "class boost::python::api::object __cdecl boost::python::api::operator&(class boost::python::api::object const &,class boost::python::api::object const &)" (??Iapi at python@boost@@YA?AVobject at 012@ABV3012 at 0@Z) object_operators.obj : error LNK2019: unresolved external symbol __imp__PyNumber_Xor referenced in function "class boost::python::api::object __cdecl boost::python::api::operator^(class boost::python::api::object const &,class boost::python::api::object const &)" (??Tapi at python@boost@@YA?AVobject at 012@ABV3012 at 0@Z) object_operators.obj : error LNK2019: unresolved external symbol __imp__PyNumber_Or referenced in function "class boost::python::api::object __cdecl boost::python::api::operator|(class boost::python::api::object const &,class boost::python::api::object const &)" (??Uapi at python@boost@@YA?AVobject at 012@ABV3012 at 0@Z) object_operators.obj : error LNK2019: unresolved external symbol __imp__PyNumber_InPlaceAdd referenced in function "class boost::python::api::object & __cdecl boost::python::api::operator+=(class boost::python::api::object &,class boost::python::api::object const &)" (??Yapi at python@boost@@YAAAVobject at 012@AAV3012 at ABV3012@@Z) object_operators.obj : error LNK2019: unresolved external symbol __imp__PyNumber_InPlaceSubtract referenced in function "class boost::python::api::object & __cdecl boost::python::api::operator-=(class boost::python::api::object &,class boost::python::api::object const &)" (??Zapi at python@boost@@YAAAVobject at 012@AAV3012 at ABV3012@@Z) object_operators.obj : error LNK2019: unresolved external symbol __imp__PyNumber_InPlaceMultiply referenced in function "class boost::python::api::object & __cdecl boost::python::api::operator*=(class boost::python::api::object &,class boost::python::api::object const &)" (??Xapi at python@boost@@YAAAVobject at 012@AAV3012 at ABV3012@@Z) object_operators.obj : error LNK2019: unresolved external symbol __imp__PyNumber_InPlaceDivide referenced in function "class boost::python::api::object & __cdecl boost::python::api::operator/=(class boost::python::api::object &,class boost::python::api::object const &)" (??_0api at python@boost@@YAAAVobject at 012@AAV3012 at ABV3012@@Z) object_operators.obj : error LNK2019: unresolved external symbol __imp__PyNumber_InPlaceRemainder referenced in function "class boost::python::api::object & __cdecl boost::python::api::operator%=(class boost::python::api::object &,class boost::python::api::object const &)" (??_1api at python@boost@@YAAAVobject at 012@AAV3012 at ABV3012@@Z) object_operators.obj : error LNK2019: unresolved external symbol __imp__PyNumber_InPlaceLshift referenced in function "class boost::python::api::object & __cdecl boost::python::api::operator<<=(class boost::python::api::object &,class boost::python::api::object const &)" (??_3api at python@boost@@YAAAVobject at 012@AAV3012 at ABV3012@@Z) object_operators.obj : error LNK2019: unresolved external symbol __imp__PyNumber_InPlaceRshift referenced in function "class boost::python::api::object & __cdecl boost::python::api::operator>>=(class boost::python::api::object &,class boost::python::api::object const &)" (??_2api at python@boost@@YAAAVobject at 012@AAV3012 at ABV3012@@Z) object_operators.obj : error LNK2019: unresolved external symbol __imp__PyNumber_InPlaceAnd referenced in function "class boost::python::api::object & __cdecl boost::python::api::operator&=(class boost::python::api::object &,class boost::python::api::object const &)" (??_4api at python@boost@@YAAAVobject at 012@AAV3012 at ABV3012@@Z) object_operators.obj : error LNK2019: unresolved external symbol __imp__PyNumber_InPlaceXor referenced in function "class boost::python::api::object & __cdecl boost::python::api::operator^=(class boost::python::api::object &,class boost::python::api::object const &)" (??_6api at python@boost@@YAAAVobject at 012@AAV3012 at ABV3012@@Z) object_operators.obj : error LNK2019: unresolved external symbol __imp__PyNumber_InPlaceOr referenced in function "class boost::python::api::object & __cdecl boost::python::api::operator|=(class boost::python::api::object &,class boost::python::api::object const &)" (??_5api at python@boost@@YAAAVobject at 012@AAV3012 at ABV3012@@Z) wrapper.obj : error LNK2019: unresolved external symbol __imp__PyDict_GetItemString referenced in function "protected: class boost::python::override __thiscall boost::python::detail::wrapper_base::get_override(char const *,struct _typeobject *)const " (?get_override at wrapper_base@detail at python@boost@@IBE?AVoverride at 34@PBDPAU_typeobject@@@Z) wrapper.obj : error LNK2001: unresolved external symbol __imp__PyMethod_Type import.obj : error LNK2019: unresolved external symbol __imp__PyImport_ImportModule referenced in function "class boost::python::api::object __cdecl boost::python::import(class boost::python::str)" (?import at python@boost@@YA?AVobject at api@12 at Vstr@12@@Z) exec.obj : error LNK2019: unresolved external symbol __imp__PyFile_FromString referenced in function "class boost::python::api::object __cdecl boost::python::exec_file(class boost::python::str,class boost::python::api::object,class boost::python::api::object)" (?exec_file at python@boost@@YA?AVobject at api@12 at Vstr@12 at V3412@1 at Z) exec.obj : error LNK2019: unresolved external symbol __imp__PyFile_AsFile referenced in function "class boost::python::api::object __cdecl boost::python::exec_file(class boost::python::str,class boost::python::api::object,class boost::python::api::object)" (?exec_file at python@boost@@YA?AVobject at api@12 at Vstr@12 at V3412@1 at Z) exec.obj : error LNK2019: unresolved external symbol __imp__PyRun_StringFlags 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) exec.obj : error LNK2019: unresolved external symbol __imp__PyRun_FileExFlags referenced in function "class boost::python::api::object __cdecl boost::python::exec_file(class boost::python::str,class boost::python::api::object,class boost::python::api::object)" (?exec_file at python@boost@@YA?AVobject at api@12 at Vstr@12 at V3412@1 at Z) 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) C:\Users\Joey\Anaconda2\libs\python27.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'X86' ..\..\..\..\bin.v2\libs\python\build\msvc-14.0\debug\threading-multi\boost_python-vc140-mt-gd-1_60.dll : fatal error LNK1120: 135 unresolved externals call "C:\Users\Joey\AppData\Local\Temp\b2_msvc_14.0_vcvarsall_x86.cmd" >nul link /NOLOGO /INCREMENTAL:NO /DLL /DEBUG /MACHINE:X86 /MANIFEST /subsystem:console /out:"..\..\..\..\bin.v2\libs\python\build\msvc-14.0\debug\threading-multi\boost_python-vc140-mt-gd-1_60.dll" /IMPLIB:"..\..\..\..\bin.v2\libs\python\build\msvc-14.0\debug\threading-multi\boost_python-vc140-mt-gd-1_60.lib" /LIBPATH:"C:\Users\Joey\Anaconda2\libs" @"..\..\..\..\bin.v2\libs\python\build\msvc-14.0\debug\threading-multi\boost_python-vc140-mt-gd-1_60.dll.rsp" if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL% ...failed msvc.link.dll ..\..\..\..\bin.v2\libs\python\build\msvc-14.0\debug\threading-multi\boost_python-vc140-mt-gd-1_60.dll ..\..\..\..\bin.v2\libs\python\build\msvc-14.0\debug\threading-multi\boost_python-vc140-mt-gd-1_60.lib ..\..\..\..\bin.v2\libs\python\build\msvc-14.0\debug\threading-multi\boost_python-vc140-mt-gd-1_60.pdb... ...removing ..\..\..\..\bin.v2\libs\python\build\msvc-14.0\debug\threading-multi\boost_python-vc140-mt-gd-1_60.lib ...removing ..\..\..\..\bin.v2\libs\python\build\msvc-14.0\debug\threading-multi\boost_python-vc140-mt-gd-1_60.pdb ...skipped hello_ext.dll for lack of boost_python-vc140-mt-gd-1_60.lib... ...skipped hello_ext.pdb for lack of boost_python-vc140-mt-gd-1_60.lib... ...skipped boost_python-vc140-mt-gd-1_60.dll for lack of boost_python-vc140-mt-gd-1_60.dll... ...skipped hello_ext.dll for lack of hello_ext.dll... ...skipped hello for lack of hello_ext.dll... ...failed updating 3 targets... ...skipped 6 targets... When I run "bjam address-model=64" I instead get Performing configuration checks - 32-bit : yes (cached) - arm : no (cached) - mips1 : no (cached) - power : no (cached) - sparc : no (cached) - x86 : yes (cached) - symlinks supported : no (cached) - junctions supported : yes (cached) - hardlinks supported : yes (cached) ...found 1 target... ...updating 1 target... config-cache.write bin\project-cache.jam ...updated 1 target... ...patience... ...patience... ...found 1924 targets... ...updating 5 targets... msvc.link.dll bin\msvc-14.0\debug\address-model-64\threading-multi\hello_ext.pyd Creating library bin\msvc-14.0\debug\address-model-64\threading-multi\hello_ext.pdb and object bin\msvc-14.0\debug\address-model-64\threading-multi\hello_ext.exp LINK : fatal error LNK1104: cannot open file 'bin\msvc-14.0\debug\address-model-64\threading-multi\hello_ext.pdb' call "C:\Users\Joey\AppData\Local\Temp\b2_msvc_14.0_vcvarsall_amd64.cmd" >nul link /NOLOGO /INCREMENTAL:NO /DLL /NOENTRY /DEBUG /MACHINE:X64 /MANIFEST /subsystem:console /out:"bin\msvc-14.0\debug\address-model-64\threading-multi\hello_ext.pyd" /IMPLIB:"bin\msvc-14.0\debug\address-model-64\threading-multi\hello_ext.pdb" /LIBPATH:"C:\Users\Joey\Anaconda2\libs" @"bin\msvc-14.0\debug\address-model-64\threading-multi\hello_ext.pyd.rsp" if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL% ...failed msvc.link.dll bin\msvc-14.0\debug\address-model-64\threading-multi\hello_ext.pyd bin\msvc-14.0\debug\address-model-64\threading-multi\hello_ext.pdb bin\msvc-14.0\debug\address-model-64\threading-multi\hello_ext.pdb... ...removing bin\msvc-14.0\debug\address-model-64\threading-multi\hello_ext.pyd ...skipped hello_ext.pyd for lack of hello_ext.pyd... ...skipped hello for lack of hello_ext.pyd... ...failed updating 2 targets... ...skipped 3 targets... -------------- next part -------------- An HTML attachment was scrubbed... URL: From ndbecker2 at gmail.com Wed Mar 23 14:18:18 2016 From: ndbecker2 at gmail.com (Neal Becker) Date: Wed, 23 Mar 2016 14:18:18 -0400 Subject: [C++-sig] Building Boost Python Tutorial Linker Errors References: Message-ID: I built boost-python on anaconda on linux using: https://anaconda.org/meznom/boost-python Joey Ortiz wrote: > Hello, > > I have spent the past week trying to build the boost python tutorial, only > to be stopped by numerous linker errors. > > I have posted my question on > http://stackoverflow.com/questions/36143494/linker-errors-running-bjam-on-boost-python-tutorial > > My system runs Windows 10, Visual Studio 2015 (msvc 14.0), Anaconda 32bit, > Anaconda 64bit, and regular default-installed Python 2.7, and the Boost > 1.60.0 libraries (I have tried both 32-bit and 64-bit builds). > > I first build my Boost libraries in either 32-bit (bootstrap, b2) or > 64-bit (bootstrap, b2 address-model=64), using the instructions at > http://www.boost.org/doc/libs/1_60_0/more/getting_started/windows.html > > I then follow the most recent boost.python tutorial at > http://www.boost.org/doc/libs/1_60_0/libs/python/doc/html/tutorial/tutorial/hello.html > (which > by the way needs serious work). > > I have tried combinations of the following build instructions and msvc / > python settings. > > > bjam > bjam address-model=64 > bjam address-model=64 architecture=x86 > > > using msvc : 14.0 ; > using msvc : 14.0 : "C:/Program Files (x86)/Microsoft Visual Studio > 14.0/VC/bin" ; > using msvc ; > > using python ; > using python : 2.7 ; > using python : 2.7 : C:/Users/Joey/Anaconda2 ; > > using python : 2.7 : "C:/Users/Joey/Anaconda2 (32-bit)" ; > > using python > : 2.7 # Version > : C:\\Users\\Joey\\Anaconda2\\python.exe # Python Path > : C:\\Users\\Joey\\Anaconda2\\include # include path > : C:\\Users\\Joey\\Anaconda2\\libs # lib path(s) > : BOOST_ALL_NO_LIB=1 > ; > > > In any setting, when I run "bjam" I get the following output: > > Performing configuration checks > > - 32-bit : yes (cached) > - arm : no (cached) > - mips1 : no (cached) > - power : no (cached) > - sparc : no (cached) > - x86 : yes (cached) > ...found 7 targets... > - symlinks supported : yes > ...found 1 target... > ...updating 1 target... > config-cache.write bin\project-cache.jam > ...updated 1 target... > ...patience... > ...patience... > ...found 1917 targets... > ...updating 9 targets... > msvc.link.dll > ..\..\..\..\bin.v2\libs\python\build\msvc-14.0\debug\threading- multi\boost_python-vc140-mt-gd-1_60.dll > Creating library > ..\..\..\..\bin.v2\libs\python\build\msvc-14.0\debug\threading- multi\boost_python-vc140-mt-gd-1_60.lib > and object > ..\..\..\..\bin.v2\libs\python\build\msvc-14.0\debug\threading- multi\boost_python-vc140-mt-gd-1_60.exp > object_protocol.obj : error LNK2001: unresolved external symbol > __imp__PyObject_GetAttrString > wrapper.obj : error LNK2001: unresolved external symbol > __imp__PyObject_GetAttrString > numeric.obj : error LNK2001: unresolved external symbol > __imp__PyObject_GetAttrString > enum.obj : error LNK2001: unresolved external symbol > __imp__PyObject_GetAttrString > class.obj : error LNK2001: unresolved external symbol > __imp__PyObject_GetAttrString > function.obj : error LNK2001: unresolved external symbol > __imp__PyObject_GetAttrString > numeric.obj : error LNK2019: unresolved external symbol > __imp__PyCallable_Check referenced in function "bool __cdecl > boost::python::numeric::`anonymous namespace'::load(bool)" > (?load@?A0xc5ed2080 at numeric@python at boost@@YA_N_N at Z) > class.obj : error LNK2001: unresolved external symbol > __imp__PyCallable_Check > function.obj : error LNK2001: unresolved external symbol > __imp__PyInt_FromLong > function_doc_signature.obj : error LNK2001: unresolved external > symbol __imp__PyInt_FromLong > numeric.obj : error LNK2001: unresolved external symbol > __imp__PyInt_FromLong > list.obj : error LNK2001: unresolved external symbol > __imp__PyInt_FromLong enum.obj : error LNK2001: unresolved external > symbol __imp__PyInt_FromLong class.obj : error LNK2001: unresolved > external symbol __imp__PyInt_FromLong numeric.obj : error LNK2019: > unresolved external symbol > __imp__PyBool_FromLong referenced in function "public: __thiscall > boost::python::converter::arg_to_python::arg_to_python(bool > const &)" (??0?$arg_to_python at _N@converter at python@boost@@QAE at AB_N@Z) > class.obj : error LNK2001: unresolved external symbol > __imp__PyBool_FromLong numeric.obj : error LNK2019: unresolved > external symbol > __imp__PyString_FromStringAndSize referenced in function "public: > __thiscall boost::python::converter::arg_to_python std::basic_string,class > std::allocator > >::arg_to_python std::basic_string,class > std::allocator > >(class std::basic_string std::char_traits,class std::allocator > const &)" > (??0?$arg_to_python at V?$basic_string at DU?$char_traits at D@std@@V? $allocator at D@2@@std@@@converter at python@boost@@QAE at ABV?$basic_string at DU? $char_traits at D@std@@V?$allocator at D@2@@std@@@Z) > str.obj : error LNK2001: unresolved external symbol > __imp__PyString_FromStringAndSize > builtin_converters.obj : error LNK2001: unresolved external symbol > __imp__PyString_FromStringAndSize > function_doc_signature.obj : error LNK2001: unresolved external > symbol __imp__PyString_FromStringAndSize > numeric.obj : error LNK2019: unresolved external symbol > __imp__PyErr_Clear referenced in function "bool __cdecl > boost::python::numeric::`anonymous namespace'::load(bool)" > (?load@?A0xc5ed2080 at numeric@python at boost@@YA_N_N at Z) > class.obj : error LNK2001: unresolved external symbol > __imp__PyErr_Clear function.obj : error LNK2001: unresolved external > symbol __imp__PyErr_Clear object_protocol.obj : error LNK2001: > unresolved external symbol > __imp__PyErr_Clear > function.obj : error LNK2001: unresolved external symbol > __imp__PyErr_Format numeric.obj : error LNK2001: unresolved external > symbol __imp__PyErr_Format from_python.obj : error LNK2001: unresolved > external symbol > __imp__PyErr_Format > registry.obj : error LNK2001: unresolved external symbol > __imp__PyErr_Format class.obj : error LNK2001: unresolved external > symbol __imp__PyErr_Format enum.obj : error LNK2001: unresolved > external symbol > __imp__PyEval_CallFunction > class.obj : error LNK2001: unresolved external symbol > __imp__PyEval_CallFunction > pickle_support.obj : error LNK2001: unresolved external symbol > __imp__PyEval_CallFunction > stl_iterator.obj : error LNK2001: unresolved external symbol > __imp__PyEval_CallFunction > numeric.obj : error LNK2001: unresolved external symbol > __imp__PyEval_CallFunction > list.obj : error LNK2001: unresolved external symbol > __imp__PyEval_CallFunction > dict.obj : error LNK2001: unresolved external symbol > __imp__PyEval_CallFunction > str.obj : error LNK2001: unresolved external symbol > __imp__PyEval_CallFunction > numeric.obj : error LNK2019: unresolved external symbol > __imp__PyImport_Import referenced in function "bool __cdecl > boost::python::numeric::`anonymous namespace'::load(bool)" > (?load@?A0xc5ed2080 at numeric@python at boost@@YA_N_N at Z) > numeric.obj : error LNK2019: unresolved external symbol > __imp__PyObject_IsInstance referenced in function "public: static bool > __cdecl > boost::python::numeric::aux::array_object_manager_traits::check(struct > _object *)" > (?check at array_object_manager_traits@aux at numeric@python at boost@@SA_NPAU_object@@@Z) > from_python.obj : error LNK2001: unresolved external symbol > __imp__PyObject_IsInstance > class.obj : error LNK2001: unresolved external symbol > __imp__PyObject_IsInstance > wrapper.obj : error LNK2001: unresolved external symbol > __imp___Py_NoneStruct > import.obj : error LNK2001: unresolved external symbol > __imp___Py_NoneStruct exec.obj : error LNK2001: unresolved external > symbol __imp___Py_NoneStruct function_doc_signature.obj : error > LNK2001: unresolved external > symbol __imp___Py_NoneStruct > iterator.obj : error LNK2001: unresolved external symbol > __imp___Py_NoneStruct > stl_iterator.obj : error LNK2001: unresolved external symbol > __imp___Py_NoneStruct > object_protocol.obj : error LNK2001: unresolved external symbol > __imp___Py_NoneStruct > object_operators.obj : error LNK2001: unresolved external symbol > __imp___Py_NoneStruct > life_support.obj : error LNK2001: unresolved external symbol > __imp___Py_NoneStruct > pickle_support.obj : error LNK2001: unresolved external symbol > __imp___Py_NoneStruct > module.obj : error LNK2001: unresolved external symbol > __imp___Py_NoneStruct builtin_converters.obj : error LNK2001: > unresolved external symbol > __imp___Py_NoneStruct > registry.obj : error LNK2001: unresolved external symbol > __imp___Py_NoneStruct > enum.obj : error LNK2001: unresolved external symbol > __imp___Py_NoneStruct class.obj : error LNK2001: unresolved external > symbol __imp___Py_NoneStruct function.obj : error LNK2001: unresolved > external symbol > __imp___Py_NoneStruct > tuple.obj : error LNK2001: unresolved external symbol > __imp___Py_NoneStruct str.obj : error LNK2001: unresolved external > symbol __imp___Py_NoneStruct slice.obj : error LNK2001: unresolved > external symbol __imp___Py_NoneStruct from_python.obj : error LNK2001: > unresolved external symbol > __imp___Py_NoneStruct > numeric.obj : error LNK2001: unresolved external symbol > __imp___Py_NoneStruct > list.obj : error LNK2001: unresolved external symbol > __imp___Py_NoneStruct long.obj : error LNK2001: unresolved external > symbol __imp___Py_NoneStruct dict.obj : error LNK2001: unresolved > external symbol __imp___Py_NoneStruct numeric.obj : error LNK2001: > unresolved external symbol > __imp__PyExc_ImportError > list.obj : error LNK2019: unresolved external symbol > __imp__PyInt_AsLong referenced in function "public: int __thiscall > boost::python::detail::list_base::count(class > boost::python::api::object const &)const " > (?count at list_base@detail at python@boost@@QBEHABVobject at api@34@@Z) > str.obj : error LNK2001: unresolved external symbol > __imp__PyInt_AsLong class.obj : error LNK2001: unresolved external > symbol __imp__PyInt_AsLong builtin_converters.obj : error LNK2001: > unresolved external symbol > __imp__PyInt_AsLong > list.obj : error LNK2019: unresolved external symbol > __imp__PyList_New referenced in function "protected: __thiscall > boost::python::detail::list_base::list_base(void)" > (??0list_base at detail@python at boost@@IAE at XZ) > list.obj : error LNK2019: unresolved external symbol > __imp__PyList_Insert referenced in function "public: void __thiscall > boost::python::detail::list_base::insert(int,class > boost::python::api::object const &)" > (?insert at list_base@detail at python@boost@@QAEXHABVobject at api@34@@Z) > list.obj : error LNK2019: unresolved external symbol > __imp__PyList_Append referenced in function "public: void __thiscall > .... > ....(too many to put here) > .... > object_operators.obj : error LNK2019: unresolved external symbol > __imp__PyNumber_Add referenced in function "class > boost::python::api::object __cdecl boost::python::api::operator+(class > boost::python::api::object const &,class boost::python::api::object > const &)" (??Hapi at python@boost@@YA?AVobject at 012@ABV3012 at 0@Z) > object_operators.obj : error LNK2019: unresolved external symbol > __imp__PyNumber_Subtract referenced in function "class > boost::python::api::object __cdecl boost::python::api::operator-(class > boost::python::api::object const &,class boost::python::api::object > const &)" (??Gapi at python@boost@@YA?AVobject at 012@ABV3012 at 0@Z) > object_operators.obj : error LNK2019: unresolved external symbol > __imp__PyNumber_Multiply referenced in function "class > boost::python::api::object __cdecl boost::python::api::operator*(class > boost::python::api::object const &,class boost::python::api::object > const &)" (??Dapi at python@boost@@YA?AVobject at 012@ABV3012 at 0@Z) > object_operators.obj : error LNK2019: unresolved external symbol > __imp__PyNumber_Divide referenced in function "class > boost::python::api::object __cdecl boost::python::api::operator/(class > boost::python::api::object const &,class boost::python::api::object > const &)" (??Kapi at python@boost@@YA?AVobject at 012@ABV3012 at 0@Z) > object_operators.obj : error LNK2019: unresolved external symbol > __imp__PyNumber_Remainder referenced in function "class > boost::python::api::object __cdecl boost::python::api::operator%(class > boost::python::api::object const &,class boost::python::api::object > const &)" (??Lapi at python@boost@@YA?AVobject at 012@ABV3012 at 0@Z) > object_operators.obj : error LNK2019: unresolved external symbol > __imp__PyNumber_Lshift referenced in function "class > boost::python::api::object __cdecl > boost::python::api::operator<<(class boost::python::api::object const > &,class boost::python::api::object const &)" > (??6api at python@boost@@YA?AVobject at 012@ABV3012 at 0@Z) > object_operators.obj : error LNK2019: unresolved external symbol > __imp__PyNumber_Rshift referenced in function "class > boost::python::api::object __cdecl > boost::python::api::operator>>(class boost::python::api::object const > &,class boost::python::api::object const &)" > (??5api at python@boost@@YA?AVobject at 012@ABV3012 at 0@Z) > object_operators.obj : error LNK2019: unresolved external symbol > __imp__PyNumber_And referenced in function "class > boost::python::api::object __cdecl boost::python::api::operator&(class > boost::python::api::object const &,class boost::python::api::object > const &)" (??Iapi at python@boost@@YA?AVobject at 012@ABV3012 at 0@Z) > object_operators.obj : error LNK2019: unresolved external symbol > __imp__PyNumber_Xor referenced in function "class > boost::python::api::object __cdecl boost::python::api::operator^(class > boost::python::api::object const &,class boost::python::api::object > const &)" (??Tapi at python@boost@@YA?AVobject at 012@ABV3012 at 0@Z) > object_operators.obj : error LNK2019: unresolved external symbol > __imp__PyNumber_Or referenced in function "class > boost::python::api::object __cdecl boost::python::api::operator|(class > boost::python::api::object const &,class boost::python::api::object > const &)" (??Uapi at python@boost@@YA?AVobject at 012@ABV3012 at 0@Z) > object_operators.obj : error LNK2019: unresolved external symbol > __imp__PyNumber_InPlaceAdd referenced in function "class > boost::python::api::object & __cdecl > boost::python::api::operator+=(class boost::python::api::object > &,class boost::python::api::object const &)" > (??Yapi at python@boost@@YAAAVobject at 012@AAV3012 at ABV3012@@Z) > object_operators.obj : error LNK2019: unresolved external symbol > __imp__PyNumber_InPlaceSubtract referenced in function "class > boost::python::api::object & __cdecl > boost::python::api::operator-=(class boost::python::api::object > &,class boost::python::api::object const &)" > (??Zapi at python@boost@@YAAAVobject at 012@AAV3012 at ABV3012@@Z) > object_operators.obj : error LNK2019: unresolved external symbol > __imp__PyNumber_InPlaceMultiply referenced in function "class > boost::python::api::object & __cdecl > boost::python::api::operator*=(class boost::python::api::object > &,class boost::python::api::object const &)" > (??Xapi at python@boost@@YAAAVobject at 012@AAV3012 at ABV3012@@Z) > object_operators.obj : error LNK2019: unresolved external symbol > __imp__PyNumber_InPlaceDivide referenced in function "class > boost::python::api::object & __cdecl > boost::python::api::operator/=(class boost::python::api::object > &,class boost::python::api::object const &)" > (??_0api at python@boost@@YAAAVobject at 012@AAV3012 at ABV3012@@Z) > object_operators.obj : error LNK2019: unresolved external symbol > __imp__PyNumber_InPlaceRemainder referenced in function "class > boost::python::api::object & __cdecl > boost::python::api::operator%=(class boost::python::api::object > &,class boost::python::api::object const &)" > (??_1api at python@boost@@YAAAVobject at 012@AAV3012 at ABV3012@@Z) > object_operators.obj : error LNK2019: unresolved external symbol > __imp__PyNumber_InPlaceLshift referenced in function "class > boost::python::api::object & __cdecl > boost::python::api::operator<<=(class boost::python::api::object > &,class boost::python::api::object const &)" > (??_3api at python@boost@@YAAAVobject at 012@AAV3012 at ABV3012@@Z) > object_operators.obj : error LNK2019: unresolved external symbol > __imp__PyNumber_InPlaceRshift referenced in function "class > boost::python::api::object & __cdecl > boost::python::api::operator>>=(class boost::python::api::object > &,class boost::python::api::object const &)" > (??_2api at python@boost@@YAAAVobject at 012@AAV3012 at ABV3012@@Z) > object_operators.obj : error LNK2019: unresolved external symbol > __imp__PyNumber_InPlaceAnd referenced in function "class > boost::python::api::object & __cdecl > boost::python::api::operator&=(class boost::python::api::object > &,class boost::python::api::object const &)" > (??_4api at python@boost@@YAAAVobject at 012@AAV3012 at ABV3012@@Z) > object_operators.obj : error LNK2019: unresolved external symbol > __imp__PyNumber_InPlaceXor referenced in function "class > boost::python::api::object & __cdecl > boost::python::api::operator^=(class boost::python::api::object > &,class boost::python::api::object const &)" > (??_6api at python@boost@@YAAAVobject at 012@AAV3012 at ABV3012@@Z) > object_operators.obj : error LNK2019: unresolved external symbol > __imp__PyNumber_InPlaceOr referenced in function "class > boost::python::api::object & __cdecl > boost::python::api::operator|=(class boost::python::api::object > &,class boost::python::api::object const &)" > (??_5api at python@boost@@YAAAVobject at 012@AAV3012 at ABV3012@@Z) > wrapper.obj : error LNK2019: unresolved external symbol > __imp__PyDict_GetItemString referenced in function "protected: class > boost::python::override __thiscall > boost::python::detail::wrapper_base::get_override(char const *,struct > _typeobject *)const " > (?get_override at wrapper_base@detail at python@boost@@IBE?AVoverride at 34@PBDPAU_typeobject@@@Z) > wrapper.obj : error LNK2001: unresolved external symbol > __imp__PyMethod_Type import.obj : error LNK2019: unresolved external > symbol > __imp__PyImport_ImportModule referenced in function "class > boost::python::api::object __cdecl boost::python::import(class > boost::python::str)" > (?import at python@boost@@YA?AVobject at api@12 at Vstr@12@@Z) > exec.obj : error LNK2019: unresolved external symbol > __imp__PyFile_FromString referenced in function "class > boost::python::api::object __cdecl boost::python::exec_file(class > boost::python::str,class boost::python::api::object,class > boost::python::api::object)" > (?exec_file at python@boost@@YA?AVobject at api@12 at Vstr@12 at V3412@1 at Z) > exec.obj : error LNK2019: unresolved external symbol > __imp__PyFile_AsFile referenced in function "class > boost::python::api::object __cdecl boost::python::exec_file(class > boost::python::str,class boost::python::api::object,class > boost::python::api::object)" > (?exec_file at python@boost@@YA?AVobject at api@12 at Vstr@12 at V3412@1 at Z) > exec.obj : error LNK2019: unresolved external symbol > __imp__PyRun_StringFlags 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) > exec.obj : error LNK2019: unresolved external symbol > __imp__PyRun_FileExFlags referenced in function "class > boost::python::api::object __cdecl boost::python::exec_file(class > boost::python::str,class boost::python::api::object,class > boost::python::api::object)" > (?exec_file at python@boost@@YA?AVobject at api@12 at Vstr@12 at V3412@1 at Z) > 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) > C:\Users\Joey\Anaconda2\libs\python27.lib : warning LNK4272: > library machine type 'x64' conflicts with target machine type 'X86' > ..\..\..\..\bin.v2\libs\python\build\msvc-14.0\debug\threading- multi\boost_python-vc140-mt-gd-1_60.dll > : fatal error LNK1120: 135 unresolved externals > > call > "C:\Users\Joey\AppData\Local\Temp\b2_msvc_14.0_vcvarsall_x86.cmd" >nul > link /NOLOGO /INCREMENTAL:NO /DLL /DEBUG /MACHINE:X86 /MANIFEST > /subsystem:console > /out:"..\..\..\..\bin.v2\libs\python\build\msvc-14.0\debug\threading- multi\boost_python-vc140-mt-gd-1_60.dll" > /IMPLIB:"..\..\..\..\bin.v2\libs\python\build\msvc-14.0\debug\threading- multi\boost_python-vc140-mt-gd-1_60.lib" > /LIBPATH:"C:\Users\Joey\Anaconda2\libs" > @"..\..\..\..\bin.v2\libs\python\build\msvc-14.0\debug\threading- multi\boost_python-vc140-mt-gd-1_60.dll.rsp" > if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL% > > ...failed msvc.link.dll > ..\..\..\..\bin.v2\libs\python\build\msvc-14.0\debug\threading- multi\boost_python-vc140-mt-gd-1_60.dll > ..\..\..\..\bin.v2\libs\python\build\msvc-14.0\debug\threading- multi\boost_python-vc140-mt-gd-1_60.lib > ..\..\..\..\bin.v2\libs\python\build\msvc-14.0\debug\threading- multi\boost_python-vc140-mt-gd-1_60.pdb... > ...removing > ..\..\..\..\bin.v2\libs\python\build\msvc-14.0\debug\threading- multi\boost_python-vc140-mt-gd-1_60.lib > ...removing > ..\..\..\..\bin.v2\libs\python\build\msvc-14.0\debug\threading- multi\boost_python-vc140-mt-gd-1_60.pdb > ...skipped hello_ext.dll for > lack of > boost_python-vc140-mt-gd-1_60.lib... > ...skipped hello_ext.pdb for > lack of > boost_python-vc140-mt-gd-1_60.lib... > ...skipped boost_python-vc140-mt-gd-1_60.dll for lack of > boost_python-vc140-mt-gd-1_60.dll... > ...skipped hello_ext.dll for lack of > hello_ext.dll... > ...skipped hello > for lack of hello_ext.dll... > ...failed updating 3 targets... > ...skipped 6 targets... > > When I run "bjam address-model=64" I instead get > > Performing configuration checks > > - 32-bit : yes (cached) > - arm : no (cached) > - mips1 : no (cached) > - power : no (cached) > - sparc : no (cached) > - x86 : yes (cached) > - symlinks supported : no (cached) > - junctions supported : yes (cached) > - hardlinks supported : yes (cached) > ...found 1 target... > ...updating 1 target... > config-cache.write bin\project-cache.jam > ...updated 1 target... > ...patience... > ...patience... > ...found 1924 targets... > ...updating 5 targets... > msvc.link.dll > bin\msvc-14.0\debug\address-model-64\threading-multi\hello_ext.pyd > Creating library > bin\msvc-14.0\debug\address-model-64\threading-multi\hello_ext.pdb and > object bin\msvc-14.0\debug\address-model-64\threading-multi\hello_ext.exp > LINK : fatal error LNK1104: cannot open file > 'bin\msvc-14.0\debug\address-model-64\threading-multi\hello_ext.pdb' > > call > "C: \Users\Joey\AppData\Local\Temp\b2_msvc_14.0_vcvarsall_amd64.cmd" >>nul > link /NOLOGO /INCREMENTAL:NO /DLL /NOENTRY /DEBUG /MACHINE:X64 > /MANIFEST /subsystem:console > /out:"bin\msvc-14.0\debug\address-model-64\threading-multi\hello_ext.pyd" > /IMPLIB:"bin\msvc-14.0\debug\address-model-64\threading- multi\hello_ext.pdb" > /LIBPATH:"C:\Users\Joey\Anaconda2\libs" > @"bin\msvc-14.0\debug\address-model-64\threading-multi\hello_ext.pyd.rsp" > if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL% > > ...failed msvc.link.dll > bin\msvc-14.0\debug\address-model-64\threading-multi\hello_ext.pyd > bin\msvc-14.0\debug\address-model-64\threading-multi\hello_ext.pdb > bin\msvc-14.0\debug\address-model-64\threading-multi\hello_ext.pdb... > ...removing > bin\msvc-14.0\debug\address-model-64\threading-multi\hello_ext.pyd > ...skipped hello_ext.pyd for lack of > hello_ext.pyd... > ...skipped > hello > for lack of > hello_ext.pyd... > ...failed updating 2 targets... ...skipped 3 targets...