[C++-sig] Re: using BOOST_PYTHON_STATIC_LIB

Rene Rivera grafik666 at redshift-software.com
Tue May 27 19:02:13 CEST 2003


[2003-05-27] David Abrahams wrote:

>"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.

Perhaps you should show what the link command was with the above changes :-)

What I suspect is that Achim didn't do a clean when he switched. Since just
changing the <dll>.. to <lib> will NOT recompile the sources using the
library.


-- grafik - Don't Assume Anything
-- rrivera at acm.org - grafik at redshift-software.com
-- 102708583 at icq




More information about the Cplusplus-sig mailing list