0

I have successfully built boost.python with visual c++ 2010(dynamic library, 64-bit). I have python 2.7.8 64-bit installed on windows 7 64-bit. I've read here that python extensions should be built with the same compiler that was used to build python itself. My question is, since python 2.7.8 was built with visual c++ 2008 64-bit compiler, can I have the following mix?

  1. my python extension built with VC2008 64-bit(to match python itself)
  2. 64-bit boost.python dll built with VC2010 64-bit
  3. python 64-bit, built itself with VC2008 64-bit

I've noticed that boost.python dll depends on python dll and that's why I'm quite worried about the mix.

Mohammed Safwat
  • 191
  • 2
  • 8

1 Answers1

0

I suspect it will work fine. I have seen cases where this sort of thing went wrong (notably, GCC 4.7.0 and 4.7.1 were ABI-incompatible with the releases before and after if you used C++11), but in the case you outlined it has a good chance of working. I'd say give it a try (and report back).

John Zwinck
  • 239,568
  • 38
  • 324
  • 436
  • I've tried some light scenarios with the mix in the question and so far it's been going good. Also I've seen many other posts(across the web and in other questions here on stack overflow) where people mentioned they built python.boost with visual c++ 2010, so I'm crossing fingers... – Mohammed Safwat Sep 30 '14 at 15:12
  • I posted the same question [here](https://mail.python.org/pipermail/cplusplus-sig/2014-September/017151.html) and the answer I received was concerned with multiple c runtime libraries being loaded into the same process(python in this case), and this agrees with my conjecture. It's probably better to stick with building boost.python with visual c++ 2008 64-bit for the moment. – Mohammed Safwat Sep 30 '14 at 15:21