[C++-sig] Cannot build Boost.Python

2010-07-06 Thread David Aldrich
Hi

I am new to Boost.Python and am trying to build its library using Visual C++ 
2008 on Windows XP.

I have downloaded and unzipped boost_1_43_0.zip and I have installed 
boost-jam-3.1.18-1-ntx86.zip.

Next, I executed:

C:\boost_1_43_0\libs\python\example\quickstart>\boost-jam-3.1.18-1-ntx86\bjam 
toolset=msvc --verbose-test test

The output I get is:

==
[snip]
msvc.link bin\test_embed.test\msvc-10.0\debug\threading-multi\test_embed.exe
LINK : warning LNK4001: no object files specified; libraries used
LINK : error LNK2001: unresolved external symbol _mainCRTStartup
bin\test_embed.test\msvc-10.0\debug\threading-multi\test_embed.exe : fatal 
error LNK1120: 1 unresolved externals

call "C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" 
x86 >nul
link /NOLOGO /INCREMENTAL:NO /DEBUG /MACHINE:X86 /subsystem:console 
/out:"bin\test_embed.test\msvc-10.0\debug\threading-multi\test_em
t_embed.test\msvc-10.0\debug\threading-multi\test_embed.exe.rsp"
if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL%

...failed msvc.link 
bin\test_embed.test\msvc-10.0\debug\threading-multi\test_embed.exe 
bin\test_embed.test\msvc-10.0\debug\threading-
...removing bin\test_embed.test\msvc-10.0\debug\threading-multi\test_embed.pdb
...skipped test_embed.run 
for lack of ___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig

[C++-sig] Newbie question about Boost.Python

2010-07-07 Thread David Aldrich
Hi

I am trying to use Boost.Python on Windows XP using Visual C++ 2008 Express and 
Python 2.7.

I have built Boost using bjam. The generated libraries include:

libboost_python-vc90-mt-gd-1_43.lib

I am now trying to run the example in the boost.python 'EmbeddingPython wiki 
page, which begins:

#include 
using namespace boost::python;
int main( int argc, char ** argv ) {
  try {
Py_Initialize();
[snip]

When I build it I get error:

LINK : fatal error LNK1104: cannot open file 'boost_python-vc90-mt-gd-1_43.lib'

Please can anyone suggest why the linker wants a library file beginning 
'boost_python' when bjam has generated library files beginning 
'libboost_python' ?

Best regards

David
___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig


Re: [C++-sig] Newbie question about Boost.Python

2010-07-08 Thread David Aldrich
Hi

I got an answer for this problem from Steven Watanabe on the boost-users list. 
He wrote:

=
The linker is looking for the import library for a DLL.
You can build this with
bjam --with-python link=shared
or you can compile your project with
-DBOOST_PYTHON_STATIC_LIB
(Boost.Python uses different auto-link conventions from the
rest of Boost)
==

That fixes my problem.

Best regards

David


From: [email protected] 
[[email protected]] On Behalf Of Philip 
Jonientz - NEXPLORE AG [[email protected]]
Sent: 08 July 2010 07:43
To: Development of Python/C++ integration
Subject: Re: [C++-sig] Newbie question about Boost.Python

Hi

I had a similar problem some time ago, I just don't exactly remember, how I 
solved it...
For me, this lib-file is located in: 
\bin.v2\libs\python\build\msvc-10.0\debug\threading-multi
If I remember correctly, I simply moved some folders and files around, until it 
fit.

-Ursprüngliche Nachricht-
Von: [email protected] 
[mailto:[email protected]] Im Auftrag von David 
Aldrich
Gesendet: Mittwoch, 7. Juli 2010 15:04
An: [email protected]
Betreff: [C++-sig] Newbie question about Boost.Python

Hi

I am trying to use Boost.Python on Windows XP using Visual C++ 2008 Express and 
Python 2.7.

I have built Boost using bjam. The generated libraries include:

libboost_python-vc90-mt-gd-1_43.lib

I am now trying to run the example in the boost.python 'EmbeddingPython wiki 
page, which begins:

#include 
using namespace boost::python;
int main( int argc, char ** argv ) {
  try {
Py_Initialize();
[snip]

When I build it I get error:

LINK : fatal error LNK1104: cannot open file 'boost_python-vc90-mt-gd-1_43.lib'

Please can anyone suggest why the linker wants a library file beginning 
'boost_python' when bjam has generated library files beginning 
'libboost_python' ?

Best regards

David
___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig
___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig


 Click 
https://www.mailcontrol.com/sr/4UrU4bFfymzTndxI!oX7UoEGNNKKZK+e8S19yqcE31+woBqi0QOlYHAZsmfuHmZeEGynLBNIB!Z1EP!VjHY16w==
  to report this email as spam.
___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig


[C++-sig] Wanted: Examples of boost.python embedded usage

2010-07-20 Thread David Aldrich
Hi

I am new to boost.python ( and to Python ) and need to demonstrate embedding 
Python code in a C++ application.

I would like to pass data to a Python function from C++ and retrieve the result.

Please can anyone suggest a tutorial that would show me how to do this please?

Best regards

David

___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] Wanted: Examples of boost.python embedded usage

2010-07-20 Thread David Aldrich
Hi Phil,

Thanks, I will take a look.

Best regards

David


From: [email protected] 
[mailto:[email protected]] On Behalf Of 
Philip Jonientz - NEXPLORE AG
Sent: 20 July 2010 12:41
To: Development of Python/C++ integration
Subject: Re: [C++-sig] Wanted: Examples of boost.python embedded usage

Hi there

http://ironalbatross.net/wiki/index.php5/CPP_BOOST_STACKLESS_PYTHON
This one is actually with stackless python, but he's using the same 
boost.python you would use with standart cpython.
If you skip the whole setting up part for linux there are some samples on how 
to create function wrappers and so on...
This tutorial really helped me(Even if this is stackless python I think it 
might help you too).

Greetings

Phil

Von: [email protected] 
[mailto:[email protected]] Im Auftrag von David 
Aldrich
Gesendet: Dienstag, 20. Juli 2010 13:26
An: [email protected]
Betreff: [C++-sig] Wanted: Examples of boost.python embedded usage

Hi

I am new to boost.python ( and to Python ) and need to demonstrate embedding 
Python code in a C++ application.

I would like to pass data to a Python function from C++ and retrieve the result.

Please can anyone suggest a tutorial that would show me how to do this please?

Best regards

David



Click 
here<https://www.mailcontrol.com/sr/RpbHqa6Adt!TndxI!oX7UvLs8dGn3uonMbI37h43g+exlmqk+Q7X0J7KzLJ+gHHxkcffdYN8DZlaXEW7R1X!lw==>
 to report this email as spam.
___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] Need help with simple boost embedded python program

2010-07-22 Thread David Aldrich
I'm new to boost.python so am just a beginner. But I built boost.python with 
bjam and then built my C++ application with MSVC 2008 (not bjam). Worked fine.

David

From: [email protected] 
[mailto:[email protected]] On Behalf Of 
Kiramin (Subscriptions)
Sent: 22 July 2010 02:03
To: [email protected]
Subject: [C++-sig] Need help with simple boost embedded python program

I can't seem to get this to work:
This little program just embeds python, creates a module using boost, and 
attempts to add it to the list of built-in modules.

//---
#include 
using namespace boost::python;

char const* greet()
{
   return "hello, world";
}

BOOST_PYTHON_MODULE(hello)
{
def("greet", greet);
}

int main()
{
  PyImport_AppendInittab("hello", inithello);
  Py_Initialize();
  return 0;
}
//---

But when I attempt to build using bjam, I get:

---
...found 1629 targets...
...updating 3 targets...
compile-c-c++ bin\msvc-10.0\debug\threading-multi\BoostPy3DEngine.obj
BoostPy3DEngine.cpp
BoostPy3DEngine.cpp(17) : error C2065: 'inithello' : undeclared identifier

call "C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 
>nul
cl /Zm800 -nologo @"bin\msvc-10.0\debug\threading-multi\BoostPy3DEngine.obj.rsp"

...failed compile-c-c++ 
bin\msvc-10.0\debug\threading-multi\BoostPy3DEngine.obj...
...skipped BoostPy3DEngine.exe for lack of
 BoostPy3DEngine.obj...
...skipped BoostPy3DEngine.pdb for lack of
 BoostPy3DEngine.obj...
...failed updating 1 target...
...skipped 2 targets...
---

My understanding is that the BOOST_PYTHON_MODULE macro is supposed to create 
the inithello function when it builds the hello module... but the compiler 
doesn't seem to be able to find it.

The above code compiles without complaint if I leave out the line:
PyImport_AppendInittab("hello", inithello);

I am using bjam with the --toolset=msvc switch (its the only way I know how to 
build with boost).  And I have MSVC version 10.0.30319.1 installed, and this is 
a Windows XP machine.

Anyone know what might be causing the above error?

Thanks for any help you can give!

-Mike


Click 
here
 to report this email as spam.
___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig

[C++-sig] Help needed with simple boost.python exception handler

2010-07-22 Thread David Aldrich
Hi

I want to add a simple exception handler to my boost.python application. I want 
it to print a simple message to the console, indicating the nature of the error.

I have seen:

try {
...
} catch ( error_already_set ) {
PyErr_Print();
}

But is there a better solution using a boost.python method instead of  
PyErr_Print() ?

Or, can I do something like the following?

catch ( const error_already_set& e ) {
cout << e.what();
}

Best regards

David


___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig

[C++-sig] Can boost_python dll be delay loaded?

2010-07-29 Thread David Aldrich
Hi

I am working on a Windows application that uses boost_python, linked with 
shared libraries.

I need to store the boost_python dll in a folder other than one in the usual 
search path (exe folder, System32, search path).  I propose to do this by 
'delay loading' the boost_python dll and calling SetDllDirectory() from the 
application.

So far I haven't got this to work. I have read that some DLLs can't be loaded 
in this way. Does anyone have experience of delay loading boost_python?

Best regards

David
___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig


Re: [C++-sig] Can boost_python dll be delay loaded?

2010-07-29 Thread David Aldrich
Hi Niall

> Wouldn't using an embedded manifest to specify a non-default DLL location be 
> much easier?

Thanks. I am not familiar with how that works. Please can you give me any tips 
on how to do this?

Best regards

David
___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig


Re: [C++-sig] Can boost_python dll be delay loaded?

2010-07-30 Thread David Aldrich
Hi Niall

> > > Wouldn't using an embedded manifest to specify a non-default DLL
> location be much easier?

Thanks for your reply. I have now succeeded in creating a manifest file for an 
assembly that includes the boost_python dll's. But I don't understand how to 
specify a non-default location for the assembly using that manifest. I believe 
this is done using 'probing' in Windows 7 but I think that is unsupported in XP.

So maybe I shall have to use delayed loading after all. Which brings me back to 
my original question, has anyone succeeded in delay loading boost_python under 
Visual C++?

Best regards

David
___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig


Re: [C++-sig] Can boost_python dll be delay loaded?

2010-07-30 Thread David Aldrich
Hi Niall

> I thought that the application installer registered the DLL manifests
> at their locations? It's like registering COM or .NET objects, in
> fact I think it's the same mechanism nowadays.

Well, I don't plan to use an application installer. Most of our users build and 
run the application from within a svn working copy.

> As for why it doesn't work when others do, I would guess it's due to
> how the BPL machinery sets itself up on process init. During static
> init the BPL library sets up all sorts of runtime information which
> is later used by BPL clients, and during all of this it is extremely
> important that everything be kept in precisely the right order.

I don't understand the intricacies of Boost's initialisation, nor do I even 
know when it happens. I naively thought that nothing would happen until I 
explicitly call a boost_python API method. Does the fact that I have included 
 mean that some boost initialisation will occur before main() 
is reached?

> Your best bet it would seem now is to have PATH
> modified on app install, but that is a very lazy way out and is
> indeed banned in lots of corporate environments. 

Sadly, I think that is the only solution. Thanks again for your help.

Best regards

David
___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig


Re: [C++-sig] Can boost_python dll be delay loaded?

2010-07-30 Thread David Aldrich
Hi Niall

Thanks again for your answers and help.

Best regards

David

> -Original Message-
> From: [email protected]
> [mailto:[email protected]] On
> Behalf Of Niall Douglas
> Sent: 30 July 2010 16:48
> To: Development of Python/C++ integration
> Subject: Re: [C++-sig] Can boost_python dll be delay loaded?
> 
> On 30 Jul 2010 at 10:56, David Aldrich wrote:
> 
> > > I thought that the application installer registered the DLL manifests
> > > at their locations? It's like registering COM or .NET objects, in
> > > fact I think it's the same mechanism nowadays.
> >
> > Well, I don't plan to use an application installer. Most of our users
> > build and run the application from within a svn working copy.
> 
> It's usually easy enough to rig up a COM object registration into a
> build system. Surely it would similar for manifest stuff.
> 
> > > As for why it doesn't work when others do, I would guess it's due to
> > > how the BPL machinery sets itself up on process init. During static
> > > init the BPL library sets up all sorts of runtime information which
> > > is later used by BPL clients, and during all of this it is extremely
> > > important that everything be kept in precisely the right order.
> >
> > I don't understand the intricacies of Boost's initialisation, nor do I
> > even know when it happens. I naively thought that nothing would happen
> > until I explicitly call a boost_python API method. Does the fact that I
> > have included  mean that some boost initialisation
> > will occur before main() is reached?
> 
> Rather it is when the BPL DLL is loaded into the process that it
> performs its static init which sets up the internal environment ready
> for your client code to call BPL APIs. The BPL DLL, like any complex
> metaprogrammed C++ DLL nowadays, will expect to be initialised before
> main() gets called and would be unlikely to work if main() gets
> called first.
> 
> > > Your best bet it would seem now is to have PATH
> > > modified on app install, but that is a very lazy way out and is
> > > indeed banned in lots of corporate environments.
> >
> > Sadly, I think that is the only solution. Thanks again for your help.
> 
> The only other I can think of is putting a symbolic link to the BPL
> DLL in the same directory as the executable. Symbolic links are Vista
> or later only sadly, though you could install Microsoft's Unix
> subsystem on XP and get symbolic links that way :)
> 
> HTH,
> Niall
> 
> --
> Technology & Consulting Services - ned Productions Limited.
> http://www.nedproductions.biz/. VAT reg: IE 9708311Q. Company no:
> 472909.
> 
> 
> 
> ___
> Cplusplus-sig mailing list
> [email protected]
> http://mail.python.org/mailman/listinfo/cplusplus-sig
> 
> 
>  Click
> https://www.mailcontrol.com/sr/QPy1GWmUWovTndxI!oX7Uqfv98hA5qioKLUaEvLrmgO
> mhsjStaar8uC2P7BlaqMtj6B2UVGAGYT63Umxp4EWgA==  to report this email as
> spam.
___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig


[C++-sig] Linking issues with Boost.Python

2010-08-17 Thread David Aldrich
Hi

I would be grateful for some help with setting up some makefiles for my C++ 
application, compiled with gcc under Linux, that uses Boost.Python.

The application consists of a static library that contains main() and various 
shared libraries that are dynamically linked at runtime as required. 

One of the shared libraries invokes the Python interpreter to act on some 
Python objects.

Initially,  I called Py_Initialize() from the shared library and linked that 
library to the Python and Boost libraries within the shared library's makefile. 
Then the Python calls worked as expected.

Now I want to move Py_Initialize() to my main() function, and invoke the Python 
interpreter from the shared library as before. So I linked the application to 
the Python and Boost libraries in my top level makefile, and deleted mention of 
the Python and Boost libraries from the shared library's makefile.  The result 
all links without errors but the Python calls do nothing.

If I use Boost.Python in a shared library, do I have to link Boost.Python to it 
when I build it, or would linking Boost.Python to the main application be 
sufficient?

(I hope this makes some sense).

Best regards

David
___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig


Re: [C++-sig] Linking issues with Boost.Python

2010-08-18 Thread David Aldrich
Hi Niall

> I would strongly recommend that you use something more modern than
> GNU make. Boost's build system is much better. The one I use is scons
> (http://www.scons.org/) whose only main fault is O(N^2) scaling to
> source file number, a problem they are in the process of fixing.

I take your point. Personally, I find makefiles very hard to maintain. In 
particular, our #include dependency management is indecipherable! I guess the 
obvious replacements are SCons and CMake. I will take a look at these.

Should one consider bjam?

Thanks very much for answering my other questions.

Best regards

David
___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig


Re: [C++-sig] Linking issues with Boost.Python

2010-08-19 Thread David Aldrich
Hi

Thanks for the replies. It seems that some people do have concerns about SCons. 

I think that CMake may be a better choice for us. We don't need the 
cross-platform capability but if CMake has more comprehensible configuration 
files and solves the #include dependency checking problem, that would be a real 
improvement over gnu make.

Best regards

David

___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig


[C++-sig] Does Py_Initialize change CTRL-C behaviour?

2010-08-25 Thread David Aldrich
Hi

We have just added Py_Initialize() and Py_Finalize() calls to our C++ 
application, in order to support embedded Python.

Our's is a console application.  We have noticed the side effect that CTRL-C no 
longer terminates the application. This is true for both Linux and Windows 
builds.

Is this a known behaviour of Py_Initialize() ?

Is there any way to reinstate normal CTRL-C handling?

Best regards

David
___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig


Re: [C++-sig] Does Py_Initialize change CTRL-C behaviour?

2010-08-25 Thread David Aldrich
Hi

I fixed this by replacing Py_Initialize() with Py_InitializeEx(0).

BR

David
___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig


[C++-sig] Help needed with Boost Python 'Hello world' tutorial

2010-09-02 Thread David Aldrich
Hi

I am using Boost 1.43 on Windows XP, with MSVC 9.0 and Python 2.7.

I am trying to run the 'Hello world' example in libs\python\example\tutorial

I have created  a user-config.jam file containing:

   # MSVC configuration
   using msvc : 9.0 ;

   # Python configuration
   using python : 2.7 : C:/Python27 ;

I then execute:

   
C:\boost_1_43_0\libs\python\example\tutorial>\boost_1_43_0\tools\jam\src\bin.ntx86\bjam.exe

The build succeeds and hello.test passes, but I have two questions:

1) hello_ext is built as a static library: hello_ext.lib. From the tutorial, I 
was expecting a dll. Is a static build correct? 

2) How may I run the test from the command line?

Best regards

David

___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig


[C++-sig] Advice sought on making a large C++ application a Python extension

2010-09-06 Thread David Aldrich
Hi

We have a large C++ application that we develop in-house. It consists of a 
large number of source files, some of which are linked directly and some of 
which are first built as static libraries.

It has been suggested that we make the application's functionality available as 
a Python extension.  Simplistically speaking, we could then let users replace 
our C++ main() by a Python script.

I have only looked at the boost.python tutorial that demonstrates a 'Hello 
world' Python extension.  For our project we would be dealing with something 
very much bigger, with many classes, singleton classes and (possibly) global 
data.  My question is, would it be practical to make all of those entities 
Python extensions?

We would also want to continue to support the application as a wholly C++ 
application.   Currently, we use gnu make to build it.  Would I have to add a 
parallel build system using bjam to build the extensions? And then maintain 
both make's makefiles and bjam's Jamroot files?

Can .pyd files be loaded by the C++ linker?

Any advice would be gratefully received.

Best regards

David

=========
David Aldrich, NEC Telecom MODUS, Ltd,
Cleeve Road, Leatherhead, Surrey, KT22 7SA, UK
Direct tel. +44 (0) 1372 381857
=

___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig



Re: [C++-sig] Advice sought on making a large C++ application a Python extension

2010-09-06 Thread David Aldrich
Hi Ravi

Thanks for your reply.

> Yes. PyOGRE or cctbx are excellent exmples of larger projects which use
> boost.python. You may want to use py++ to automate binding generation to
> save yourself quite some time.

Ok, I will look at py++.

> No. The python modules can be compiled using regular make. My
> recommendation
> is to avoid using bjam, even if it is technically superior, as it is not
> used
> widely enough to have the critical mass that other tools (autotools, cmake,
> scons) have which means that finding help is pretty painful (as there seem
> to
> be only a couple of people with knowledge sufficient to answer any non-
> trivial
> questions).

Understood. Though the boost community seems to promote bjam quite hard ;-)

> These are simply shared libraries (on POSIX). So the linker can read them.
> Avoid storing the python bindings in the same shared libraries as your
> core code since the coupling will be hard to undo while gaining nothing.

So, I should make both normal dll's for the C++ application and .pyd extensions 
for the Python interface?

Best regards

David
___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig


Re: [C++-sig] Advice sought on making a large C++ application a Python extension

2010-09-15 Thread David Aldrich
Hi Ben

Thanks very much for your reply. Sorry that my response has been slow but I 
have been trying to digest yours. I have also taken a detour to investigate 
CMake.

>As to how to make your functionality available with a Python 
>extension - I'm not sure exactly what kind of app you have, 
>but is it possible to make the Python portion only an 
>interface to the underlying C++ code? That's basically what 
>we did with our application - write a wrapper layer on top 
>of the ordinary C++ API that implemented a Python API. This 
>also allowed us to build the C++ application, and then with
>an additional build step (in GNU make) we were able to 
>compile the python interface layer.

I'm sorry to say that I don't really understand the concept of making the 
Python portion only an interface to the underlying C++ code. Please could you 
explain what that means? 

Best regards

David
___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig


[C++-sig] Boost / python-devel / python dependency problem

2011-01-06 Thread David Aldrich
Hi

I wonder if someone could help me out with a yum dependency problem please?

I am running Centos 5.5. I installed Boost 1.40 from the Black Op Software 
repo. I now need to install python-devel, but when I do so I get:

=
$ sudo yum install python-devel
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
* addons: anorien.csc.warwick.ac.uk
* base: anorien.csc.warwick.ac.uk
* extras: mirror.as29550.net
* updates: anorien.csc.warwick.ac.uk
943 packages excluded due to repository priority protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package python-devel.i386 0:2.4.3-27.el5 set to be updated
--> Processing Dependency: python = 2.4.3-27.el5 for package: python-devel
--> Finished Dependency Resolution
python-devel-2.4.3-27.el5.i386 from base has depsolving problems
  --> Missing Dependency: python = 2.4.3-27.el5 is needed by package 
python-devel-2.4.3-27.el5.i386 (base)
Error: Missing Dependency: python = 2.4.3-27.el5 is needed by package 
python-devel-2.4.3-27.el5.i386 (base)
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
    package-cleanup --dupes
    rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.
=

However, I do have python 2.4 installed:

= 
$ sudo yum install python
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
* addons: anorien.csc.warwick.ac.uk
* base: anorien.csc.warwick.ac.uk
* extras: mirror.as29550.net
* updates: anorien.csc.warwick.ac.uk
943 packages excluded due to repository priority protections
Setting up Install Process
Package matching python-2.4.3-27.el5.i386 already installed. Checking for 
update.
Nothing to do
=

Finally, this may be useful information:

=
[daldr...@localhost Zodiac]$ yum list python
Loaded plugins: fastestmirror, priorities
blackop 474/474
943 packages excluded due to repository priority protections
Installed Packages
python.i386  2.4.3-27.el5_5.3  installed
[daldr...@localhost Zodiac]$
=

So python-devel seems to want python 2.4.3-27.el5 but I have 2.4.3-27.el5_5.3   
   

Any suggestions how I can fix this please?

David 

___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig


[C++-sig] How to configure makefile for different build platforms

2011-10-05 Thread David Aldrich
Hi

I have a C++ application that uses Boost.Python.  We build it on Centos 5.3, 
with Python 2.4 and Boost 1.34.

Our makefile uses explicit paths to find Python and Boost. For the headers we 
use:

PYTHON = /usr/include/python2.4
BOOST_INC = /usr/include/boost

INCPATH=$(PYTHON)
INCPATH+=$(BOOST_INC)

CXXFLAGS += $(patsubst %,-I%,$(INCPATH))

$(CXX) -c $(CXXFLAGS) sourcefile etc

Now I need to support building on Ubuntu 10.04 which has Python 2.6, not 2.4, 
installed.

Please can someone suggest how I can modify the makefile to conveniently handle 
the different Python paths according to the build platform.

Should I simply require the user to define PYTHON as an environment variable, 
or is there a better way without resorting to something complex like autoconf?

Best regards

David

___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] How to configure makefile for different build platforms

2011-10-06 Thread David Aldrich
> On Ubuntu you can call pkg-config to figure out the right compiler and linker
> options for both Boost and Python. I would expect CentOS to support that as
> well.


Hi Wichert

Thanks for your suggestion. However, on my Ubuntu system:

pkg-config --list-all

lists neither python-dev not libboost-all-dev

which are what my makefile needs to reference.

David
___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig


Re: [C++-sig] How to configure makefile for different build platforms

2011-10-06 Thread David Aldrich
> pkg-config does not use Debian packages names. Try using "python" for the
> current standard python 2 version, or pythonX.Y for specific versions. Boost
> appears to be installed in a standard location, so doesn't need any special
> compiler or linker options.

Thanks but --list-all only lists notify-python and  dbus-python.

David
___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig


Re: [C++-sig] How to configure makefile for different build platforms

2011-10-06 Thread David Aldrich


> -Original Message-
> From: [email protected]
> [mailto:[email protected]]
> On Behalf Of Wichert Akkerman
> Sent: 06 October 2011 14:51
> To: [email protected]
> Subject: Re: [C++-sig] How to configure makefile for different build platforms
> 
> On 10/06/2011 03:09 PM, David Aldrich wrote:
> >> pkg-config does not use Debian packages names. Try using "python" for
> >> the current standard python 2 version, or pythonX.Y for specific
> >> versions. Boost appears to be installed in a standard location, so
> >> doesn't need any special compiler or linker options.
> > Thanks but --list-all only lists notify-python and  dbus-python.
> 
> Odd. Try python2.6-config.

No, that's not there either.

http://bugs.python.org/issue3585  suggests that pkg-config support in Python 
was not added until at least 2.6.  Perhaps it did not make it in the version I 
have.  Besides, I also wanted it to detect Python 2.4. So this method won't 
work unfortunately.
___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig


Re: [C++-sig] How to configure makefile for different build platforms

2011-10-06 Thread David Aldrich
 
> You can also extract this information from various methods in the distutils
> package.  Even if you aren't using distutils to control the build, you could 
> ask
> Python itself to print out the configuration variables.  For instance:
> 
> python -c "import distutils.sysconfig; print
> distutils.sysconfig.get_python_inc()"
> 
> That should give you the Python include directory.  There are other methods
> to get library names, compiler flags, and other things.

Hi Jim

That is very useful. Thank you.

How could I get the major version number (e.g. 2.4) so that I can build the 
library type:

EXTRA_LIBS_R+=-lpython2.4

BR

David
___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig


Re: [C++-sig] How to configure makefile for different build platforms

2011-10-06 Thread David Aldrich
 > sys.version_info

How would I get that from the command line please?
___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig


Re: [C++-sig] How to configure makefile for different build platforms

2011-10-06 Thread David Aldrich
> > How would I get that from the command line please?
> 
> python -c "import sys; print '%d.%d' % sys.version_info[:2]"

Fantastic. Thank you very much.

David
___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig


Re: [C++-sig] Cannot build Boost.Python

2011-10-21 Thread David Aldrich
> I am running to the same issue. I am new to Python as well. Can you let me 
> know how you solved your issue ? 

Hi Ramesh

I'm sorry, that was a long time ago.  I suggest you start a new thread on the 
mailing list and explain your situation there with more detail.

Best regards

David

___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig


[C++-sig] undefined symbol: _ZTIN5boost6python15instance_holderE

2015-05-19 Thread David Aldrich
Hi

I have an application that uses Boost Python. It links and runs fine on Centos 
5 systems but fails on an Ubuntu 14.04 LTS system.

The code that uses Boost Python is compiled using:

g++ -c -Wall -m64 -DPYTHON_ENABLE -I../Kernel -I/usr/include/python2.7 
-I/usr/include/ -O3 main.cpp -o _gnuRelease/main.o

and linked into a static library using:


g++ -o _gnuRelease/mylib -Wl,-whole-archive,-export-dynamic 
../Kernel/_gnuRelease/libKernel.a  -L/usr/lib/x86_64-linux-gnu  
-lboost_python-py27 -lpython2.7 -Wl,--no-whole-archive -ldl

When the library is linked to my main program and run I see error:


undefined symbol: _ZTIN5boost6python15instance_holderE ( typeinfo for 
boost::python::instance_holder )

Please can someone suggest how to fix this?

Best regards

David

___
Cplusplus-sig mailing list
[email protected]
https://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] undefined symbol: _ZTIN5boost6python15instance_holderE

2015-05-20 Thread David Aldrich
Hi

Thanks for your reply.

> Does your main program link with boost_python?
> You didn't paste the link command of main, which would have been helpful
> here.

I'm sorry, while sanitizing the command for posting here, I obscured some 
meaning.  The way the link process works is that the library includes a main(), 
we build the library with ar and then link it to form the executable:

ar: creating _gnuRelease/libKernel.a
g++ -o _gnuRelease/MyExecutable -Wl,-whole-archive,-export-dynamic 
../Kernel/_gnuRelease/libKernel.a  -L/usr/lib/x86_64-linux-gnu  
-lboost_python-py27 -lpython2.7 -Wl,--no-whole-archive -ldl

> Also, if you link with boost_python, does it match the Python version in use
> (2 vs 3)?

How would I check this please?

Best regards

David

___
Cplusplus-sig mailing list
[email protected]
https://mail.python.org/mailman/listinfo/cplusplus-sig


[C++-sig] Trouble building boost with Visual Studio 2010

2016-03-09 Thread David Aldrich
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

___
Cplusplus-sig mailing list
[email protected]
https://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] Trouble building boost with Visual Studio 2010

2016-03-09 Thread David Aldrich
> 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
___
Cplusplus-sig mailing list
[email protected]
https://mail.python.org/mailman/listinfo/cplusplus-sig


Re: [C++-sig] Trouble building boost with Visual Studio 2010

2016-03-09 Thread David Aldrich
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:[email protected]] 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:[email protected]] On Behalf Of 
David Aldrich
Sent: Wednesday, March 09, 2016 5:05 AM
To: Development of Python/C++ integration
Subject: [C++-sig] Trouble building boost with Visual Studio 2010

Hi

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

I use the command:

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

and get the following error:

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

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

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

Best regards

David


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

Click 
here<https://www.mailcontrol.com/sr/VIdq9eIbFJ3GX2PQPOmvUiQSa3+T5MHvzY1DQvi2lw+FqzJbzBJIALiBTIHiUs7caaqy85oZ6mcgL4AI7al!HQ==>
 to report this email as spam.
___
Cplusplus-sig mailing list
[email protected]
https://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] Trouble building boost with Visual Studio 2010

2016-03-09 Thread David Aldrich
Ok, thanks. The console defaults to 3.5, which is the problem.

I'll see what I can do.

From: Cplusplus-sig 
[mailto:[email protected]] 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:[email protected]] 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:[email protected]] On Behalf 
Of Liam Herron
Sent: 09 March 2016 14:40
To: Development of Python/C++ integration 
mailto:[email protected]>>
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:[email protected]] On Behalf Of 
David Aldrich
Sent: Wednesday, March 09, 2016 5:05 AM
To: Development of Python/C++ integration
Subject: [C++-sig] Trouble building boost with Visual Studio 2010

Hi

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

I use the command:

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

and get the following error:

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

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

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

Best regards

David


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

Click 
here<https://www.mailcontrol.com/sr/VIdq9eIbFJ3GX2PQPOmvUiQSa3+T5MHvzY1DQvi2lw+FqzJbzBJIALiBTIHiUs7caaqy85oZ6mcgL4AI7al!HQ==>
 to report this email as spam.
___
Cplusplus-sig mailing list
[email protected]
https://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] Trouble building boost with Visual Studio 2010

2016-03-10 Thread David Aldrich
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:[email protected]] 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:[email protected]] 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:[email protected]] On Behalf 
Of Liam Herron
Sent: 09 March 2016 16:52
To: Development of Python/C++ integration 
mailto:[email protected]>>
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:[email protected]] 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:[email protected]] On Behalf 
Of Liam Herron
Sent: 09 March 2016 14:40
To: Development of Python/C++ integration 
mailto:[email protected]>>
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:[email protected]] 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 

Re: [C++-sig] Trouble building boost with Visual Studio 2010

2016-03-10 Thread David Aldrich
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:[email protected]] 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:[email protected]] 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:[email protected]] On Behalf 
Of Liam Herron
Sent: 09 March 2016 17:03
To: Development of Python/C++ integration 
mailto:[email protected]>>
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:[email protected]] 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:[email protected]] On Behalf 
Of Liam Herron
Sent: 09 March 2016 16:52
To: Development of Python/C++ integration 
mailto:[email protected]>>
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:[email protected]] 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:[email protected]] On Behalf 
Of Liam Herron
Sent: 09 March 2016 14:40
To: Development of Python/C++ integration 
mailto:[email protected]>>
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 
w