Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
December 28, 2008 DDL problem | ||||
---|---|---|---|---|
| ||||
Hi I would like to use DDL but I couldn't get the latest svn/trunk and quick example to work with latest dmd. I think the syntax of templates has changed since it was last tested. |
December 28, 2008 Re: DDL problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tim M | On Sat, Dec 27, 2008 at 10:43 PM, Tim M <a@b.com> wrote:
>
> Hi I would like to use DDL but I couldn't get the latest svn/trunk and quick example to work with latest dmd. I think the syntax of templates has changed since it was last tested.
>
D1 or D2?
|
December 28, 2008 Re: DDL problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | Sorry I should have made myself more clear. Latest d1 (1.038). If you get ddl from trunk and try to build quick example there will be an error about tango.io.FileConduit; so I changed that to tango.io.device.FileConduit; and it then complains about ddl\ExpContainer.d(51): Error: argument FIXUPP to typeof is not an expression. It is defined like: struct ExpContainer(T){ alias typeof(T) BaseType; alias T[] ArrayType; so I tried changing that to: struct ExpContainer(T){ alias T BaseType; alias T[] ArrayType; does this look correct. Dmd seems to think so but then there is an error with ddl/DynamicLibrary.d: template getDExport(T, char [] name) { static if(T.mangleof[0] == 'P'){ typeof(T) getDExport() { return cast(typeof(T))getSymbol( "_D" ~ mangleSymbolName!(name) ~ T.mangleof[1..$]).address; } } else { typeof(T) getDExport() { return cast(typeof(T))getSymbol("_D" ~ mangleSymbolName!(name) ~ T.mangleof).address; } } } On Sun, 28 Dec 2008 17:02:29 +1300, Jarrett Billingsley <jarrett.billingsley@gmail.com> wrote: > On Sat, Dec 27, 2008 at 10:43 PM, Tim M <a@b.com> wrote: >> >> Hi I would like to use DDL but I couldn't get the latest svn/trunk and quick >> example to work with latest dmd. I think the syntax of templates has changed >> since it was last tested. >> > > D1 or D2? |
December 29, 2008 Re: DDL problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tim M | NVM I think I've figured it out. I'll try and get in touch with a dev for the change to be put through.
On Sun, 28 Dec 2008 17:16:05 +1300, Tim M <a@b.com> wrote:
> Sorry I should have made myself more clear. Latest d1 (1.038). If you get ddl from trunk and try to build quick example there will be an error about tango.io.FileConduit; so I changed that to tango.io.device.FileConduit; and it then complains about ddl\ExpContainer.d(51): Error: argument FIXUPP to typeof is not an expression. It is defined like:
>
> struct ExpContainer(T){
> alias typeof(T) BaseType;
> alias T[] ArrayType;
>
> so I tried changing that to:
>
> struct ExpContainer(T){
> alias T BaseType;
> alias T[] ArrayType;
>
> does this look correct. Dmd seems to think so but then there is an error with ddl/DynamicLibrary.d:
>
> template getDExport(T, char [] name) {
> static if(T.mangleof[0] == 'P'){
> typeof(T) getDExport() {
> return cast(typeof(T))getSymbol( "_D" ~ mangleSymbolName!(name) ~ T.mangleof[1..$]).address;
> }
> } else {
> typeof(T) getDExport() {
> return cast(typeof(T))getSymbol("_D" ~ mangleSymbolName!(name) ~ T.mangleof).address; }
> }
> }
>
>
>
> On Sun, 28 Dec 2008 17:02:29 +1300, Jarrett Billingsley <jarrett.billingsley@gmail.com> wrote:
>
>> On Sat, Dec 27, 2008 at 10:43 PM, Tim M <a@b.com> wrote:
>>>
>>> Hi I would like to use DDL but I couldn't get the latest svn/trunk and quick
>>> example to work with latest dmd. I think the syntax of templates has changed
>>> since it was last tested.
>>>
>>
>> D1 or D2?
>
|
December 29, 2008 Re: DDL problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tim M | Hello tim, > NVM I think I've figured it out. I'll try and get in touch with a dev > for the change to be put through. > > On Sun, 28 Dec 2008 17:16:05 +1300, Tim M <a@b.com> wrote: > >> Sorry I should have made myself more clear. Latest d1 (1.038). If you >> get ddl from trunk and try to build quick example there will be an >> error about tango.io.FileConduit; so I changed that to >> tango.io.device.FileConduit; and it then complains about >> ddl\ExpContainer.d(51): Error: argument FIXUPP to typeof is not an >> expression. It is defined like: >> >> struct ExpContainer(T){ >> alias typeof(T) BaseType; >> alias T[] ArrayType; >> so I tried changing that to: >> >> struct ExpContainer(T){ >> alias T BaseType; >> alias T[] ArrayType; >> does this look correct. Dmd seems to think so but then there is an >> error with ddl/DynamicLibrary.d: >> >> template getDExport(T, char [] name) { >> static if(T.mangleof[0] == 'P'){ >> typeof(T) getDExport() { >> return cast(typeof(T))getSymbol( "_D" ~ mangleSymbolName!(name) ~ >> T.mangleof[1..$]).address; >> } >> } else { >> typeof(T) getDExport() { >> return cast(typeof(T))getSymbol("_D" ~ mangleSymbolName!(name) ~ >> T.mangleof).address; } >> } >> } >> On Sun, 28 Dec 2008 17:02:29 +1300, Jarrett Billingsley >> <jarrett.billingsley@gmail.com> wrote: >> >>> On Sat, Dec 27, 2008 at 10:43 PM, Tim M <a@b.com> wrote: >>> >>>> Hi I would like to use DDL but I couldn't get the latest svn/trunk >>>> and >>>> quick >>>> example to work with latest dmd. I think the syntax of templates >>>> has >>>> changed >>>> since it was last tested. >>> D1 or D2? >>> You might try the version that Tom S. (h3r3tic) maintains. He appears to be using it in his D projects and keeps adding fixes as he goes. If you know how to use the Mercurial repository, have a look at it here: http://team0xf.com:1024/linker It's very likely to have already fixed the problems that still exist in the dsource ddl repository. -JJR |
Copyright © 1999-2021 by the D Language Foundation