Thread overview
pyd still usable?
Apr 27, 2009
mpt
Apr 28, 2009
Simen Haugen
April 27, 2009
Which versions of tango+gdc+pyd do I need to get stuff to work? I'd like to use D+Python on 32 or 64 bit Linux. I've tried a number of tango/gdc bundles and pyd rc/trunk, but there are always compiler and linker errors.

How do you build Tango to a library that can be linked to a dynamic library, such as a Python extension?

April 27, 2009
On Mon, Apr 27, 2009 at 11:18 AM, mpt <mpt@iki.fi> wrote:
> Which versions of tango+gdc+pyd do I need to get stuff to work? I'd like to use D+Python on 32 or 64 bit Linux. I've tried a number of tango/gdc bundles and pyd rc/trunk, but there are always compiler and linker errors.
>
> How do you build Tango to a library that can be linked to a dynamic library, such as a Python extension?

Unless Kirk has updated it recently, Pyd is still Phobos-only, but the library-dependent code as far as I know is limited to one module and something like four functions.
April 28, 2009
Jarrett Billingsley wrote:
> On Mon, Apr 27, 2009 at 11:18 AM, mpt <mpt@iki.fi> wrote:
>> Which versions of tango+gdc+pyd do I need to get stuff to work? I'd like
>> to use D+Python on 32 or 64 bit Linux. I've tried a number of tango/gdc
>> bundles and pyd rc/trunk, but there are always compiler and linker errors.
>>
>> How do you build Tango to a library that can be linked to a dynamic
>> library, such as a Python extension?
> 
> Unless Kirk has updated it recently, Pyd is still Phobos-only, but the
> library-dependent code as far as I know is limited to one module and
> something like four functions.

It uses templates for bindings, and if I remember correctly, dmd hits the limit for max variable name length when using templates.
I hit the limit somewhere around 8 functions I think.

Might work on linux, but I haven't tried.
April 28, 2009
On Tue, Apr 28, 2009 at 4:05 AM, Simen Haugen <simen@norstat.no> wrote:
>
> It uses templates for bindings, and if I remember correctly, dmd hits the
> limit for max variable name length when using templates.
> I hit the limit somewhere around 8 functions I think.

Actually the name limit hasn't been a problem for several months now. DMD Win now MD5-hashes long symbol names so it's now impossible (?) to crash OPTLINK by having long symbol names.  However, this has simply fixed one problem to reveal another: OPTLINK will die if there are too many fixups in a single object.  Just a hard crash.  This happens a lot in Pyd-like code with several classes and methods wrapped.

> Might work on linux, but I haven't tried.

It does.  The only weak link is OPTLINK, which is only used by DMD Win.