Python - Boost - Cygwin linker error

David Abrahams dave at boost-consulting.com
Tue Nov 26 19:06:37 EST 2002


Jason Tishler <jason at tishler.net> writes:

> Stéphane,
>
> On Sat, Nov 23, 2002 at 07:42:28PM -0800, Stéphane Vaxelaire wrote:
>> I get an error at link time that appears to occur between Boost code
>> and python lib. Here is the output :

<snip>

> The above can be solved by compiling the code that refers to
> _Py_NoneStruct with -DUSE_DL_IMPORT.  This will cause _Py_NoneStruct to
> be declared so that it can be imported (without auto-import) from the
> Cygwin Python import library.
>
> Note that this occurs automatically for Distutils built shared
> extensions.  If Boost.Python is built using a different mechanism,
> then -DUSE_DL_IMPORT will have to be specified manually.

Naw, Boost.Python's own build mechanism (Boost.Build) also adds
-DUSE_DL_IMPORT automatically for Cygwin. This only happened because
Stéphane decided to build things ``manually'' in the first place ;-)

-- 
                       David Abrahams
   dave at boost-consulting.com * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution



More information about the Python-list mailing list