.cpp to .pyd

Ulrich Eckhardt eckhardt at satorlaser.com
Thu Aug 7 11:37:48 CEST 2008

vedrandekovic at yahoo.com wrote:
> hellomodule.cpp(9) : fatal error C1083: Cannot open include file:
> 'boost/python/module.hpp': No such file or directory

You need to tell it where to find the Boost includes. I suggest you first
try to get some header-only Boost library going as example, if you have
that right, you also have the include paths right.

In your second posting, you gave a link to a picture which had the exact
right dialog for setting this as system setup. You can also set the path on
a per-project base, then it's in the C++ settings.

Note that for compiled libraries like Boost.Python you will first have to
compile those (see Boost docs), put the DLLs into a place where they can be
found (e.g. the windows dir or anything else on the path) and also have to
set a path to the .LIBS in the linker settings.

As an alternative to compiling libraries separately, you can also include
the Boost sources into your project, just add BOOST_PYTHON_STATIC_LIB to
the preprocessor defines and include the following files from one(!)
translation unit:


Note: this is with Boost 1.33.1, newer versions likely differ.


Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932

More information about the Python-list mailing list