|
Boost Users : |
From: Thomas Berg (merlin66b_at_[hidden])
Date: 2008-08-03 10:55:41
If I understood correctly, these instructions were for building boost python
itself, using Visual Studio instead of bjam. I suspect that's not what you
really want. If it was, you would need to get all the CPPDEFINES right, and
remove any extra code that was added by Visual studio (like dllmain.cpp,
stdafx.cpp etc.). It's better to let bjam build boost...
If you are just building a new python extension it's less complicated:
- I am assuming that you have built boost (and boost python) with bjam already
- Create a Visual Studio project that builds a shared library (dll)
- Make sure it contains no code created by Visual Studio, then just add the
source code for your python extension (and don't add the boost python library
source code to the project)
- Obviously set up include paths to include the Python and boost include
directories, and similar for the library search path
- You will need to link to python25.lib in the python distribution, and link to
the correct boost python .lib from boost
- You probably want to change the output name from .dll to .pyd (since the
python interpreter expects that from version 2.5, and is not able to import a
module named .dll)
happybrowndog <happybrowndog <at> hotmail.com> writes:
>
> Are you sure this works? I followed every step for making a DLL as you
> had described, but I get a lot of warnings and errors. I am using Boost
> 1.35.0 with Visual C++ 9.0. Here is the first batch of warnings leading
> to the first error:
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net