www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Help with compile error

reply Jacob Carlborg <doobnet gmail.com> writes:
I'm trying to compile this file: http://tango.pastebin.com/m3c708004
and I'm getting this error:

Error: this for init needs to be type NSObject not type dwt.graphics.GC.GC

It's quite annoying that I don't get any file or line information.

The other files are available here: 
http://www.dsource.org/projects/dwt-mac/browser/dwt
but they are old.

I'm compiling on osx 10.5.5 with gdc-r229 like this:

gdmd -c -odobjs -I/usr/share/gdc/include/d/4.1.2/tango -version=Posix 
dwt/graphics/GC.d
Oct 06 2008
parent BCS <ao pathlink.com> writes:
Reply to Jacob,

 I'm trying to compile this file: http://tango.pastebin.com/m3c708004
 and I'm getting this error:
 
 Error: this for init needs to be type NSObject not type
 dwt.graphics.GC.GC
 
I'm not going to read that source (I don't use Tango for one) but in the class dwt.graphics.GC.GC look for a call to NSObject.init (named just like that) If you find one, then the error is likely that NSObject.init is supposed to be static and is not. If you mark it as static and don't get any errors in it, you're good.
Oct 06 2008