www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - DDL problem

reply "Tim M" <a b.com> writes:
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.
Dec 27 2008
parent reply "Jarrett Billingsley" <jarrett.billingsley gmail.com> writes:
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?
Dec 27 2008
parent reply "Tim M" <a b.com> writes:
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?
Dec 27 2008
parent reply "Tim M" <a b.com> writes:
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?
Dec 28 2008
parent John Reimer <terminal.node gmail.com> writes:
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
Dec 28 2008