[C++-sig] passing wrapped c++ objects to boost wrapped function

Roman Yakovenko roman.yakovenko at gmail.com
Thu Jan 4 21:40:31 CET 2007


On 1/4/07, Kim Branson <kim.branson at gmail.com> wrote:
> Hi all
>
> heres the complete minimal example.

It is not complete, neither minimal.

>
> extension test                     # Declare a Python extension
> called test
> :   test.cpp                       # source
>      # requirements and dependencies for Boost.Python extensions
>      <template>@boost/libs/python/build/extension
> :    <include>"/usr/local/openeye/include"
> :    <library-path>"/usr/local/openeye/lib"
>      ;

But it already contains some useful information - you are using Unix
like operating
system, right?

Here some help from Python documentation:

setdlopenflags(n)
    Set the flags used by the interpreter for dlopen() calls, such as
when the interpreter loads extension modules. Among other things, this
will enable a lazy resolving of symbols when importing a module, if
called as sys.setdlopenflags(0). To share symbols across extension
modules, call as sys.setdlopenflags(dl.RTLD_NOW | dl.RTLD_GLOBAL).
Symbolic names for the flag modules can be either found in the dl
module, or in the DLFCN module. If DLFCN is not available, it can be
generated from /usr/include/dlfcn.h using the h2py script.

setdlopenflags function belongs to sys module. I think this should
solve your problem.

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/



More information about the Cplusplus-sig mailing list