[DGD] Bugz

Blain blain20 at gmail.com
Thu Apr 25 05:17:54 CEST 2013


On Thu, Apr 25, 2013 at 4:04 AM, Felix A. Croes <felix at dworkin.nl> wrote:
>
> > Error 1:
> > [Compile] /sys/lib/user/api/io[18]: syntax error
> >
> > Error 2:
> > [Compile] /sys/lib/user/api/io[20]: undeclared variable
> INHERITABLE_SUBDIR
> >
> >
> > Error 1 isn't very helpful, to say the least.
>
> That's what you get when playing with macros.  That said, I knew I should
> never have made the subdirs configurable with macros. :(


I initially had config.h included into std.h, but then decided to take it
out to clean up the object space of all objects.  So long as I remember to
include config.h along with the other kernel header files that I need for a
given operation, I'll be good to go.

> I stumbled upon error 2
> > while working with Shentino to figure out what the syntax error was
> exactly.
>
> A perfectly reasonable errormessage.


I merely noted that the macro issue produced a less informative error if in
a funcspec in case you wished to expand on it in the source, if feasible.
;)  Also as a warning to any other DGD newbies reading.

> Error 1:
> > [Compile] /sys/lib/user/api/io[22]: incompatible types for equality
> > (object, object)
>
> This is a genuine problem.  However, you can just declare the global
> variable in the same way:
>
>     private void object LIB_USER user;
>
> Regards,
> Felix Croes
>

Aha, that'll do the trick.  Thanks. ;)   I probably read that a million
times in the archives and documentation, too.  I'm having a lot of fun with
this driver.  I get confused a lot, but that's normal for me.  The
information I need is scattered all over the place and I often can't
remember what I'd read from the archives or documentation when I'm
elbow-deep in coding something.  Back to the grindstone!

Thanks, again!

--Blain



More information about the DGD mailing list