[C++-sig] Re: using BOOST_PYTHON_STATIC_LIB

David Abrahams dave at boost-consulting.com
Tue May 27 18:47:57 CEST 2003


"Achim Domma \(ProCoders\)" <domma at procoders.net> writes:

>> You shouldn't have to use the shared library.
>
> What does "shouldn't have to" mean? 

It means that linking to the static library is supposed to work.

> I know about the inter module support of boost.python and wouldn't
> use a static version for 'normal' extension modules. But I want to
> embed python in a COM object. If it's possible, I would like to have
> no additional dll to ship. That's the reason for my question: If
> it's supported, I would like to use it. If not, it's also no
> problem.

Well, it hasn't been tested recently, so I guess that means it's
likely to be broken :(.

But it's supposed to work.

As a matter of fact, it does work.  I just made the following change
to libs/python/test/Jamfile and ran the embedding test, which proves
it works:

    *** Jamfile.~1.59.~	Wed Mar 12 09:11:47 2003
    --- Jamfile	Tue May 27 12:44:23 2003
    ***************
    *** 55,65 ****
          boost-python-runtest $(name) : $(py) <pyd>$(modules) ;
      }

    ! run ../test/embedding.cpp <dll>../build/boost_python
        : # program args
        : # input files
        : # requirements
        $(PYTHON_PROPERTIES)
          <library-path>$(PYTHON_LIB_PATH)
            <$(gcc-compilers)><debug-python><library-path>$(CYGWIN_PYTHON_DEBUG_DLL_PATH)
              <$(gcc-compilers)><*><library-path>$(CYGWIN_PYTHON_DLL_PATH)
    --- 55,66 ----
          boost-python-runtest $(name) : $(py) <pyd>$(modules) ;
      }

    ! run ../test/embedding.cpp <lib>../build/boost_python
        : # program args
        : # input files
        : # requirements
        $(PYTHON_PROPERTIES)
    +     <define>BOOST_PYTHON_STATIC_LIB
          <library-path>$(PYTHON_LIB_PATH)
            <$(gcc-compilers)><debug-python><library-path>$(CYGWIN_PYTHON_DEBUG_DLL_PATH)
              <$(gcc-compilers)><*><library-path>$(CYGWIN_PYTHON_DLL_PATH)


So, as I said, I suspect name collision in the bin-stage directory.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com





More information about the Cplusplus-sig mailing list