Linking problem with custom associative arrays

Adam Ruppe destructionator at gmail.com
Sun Jul 18 18:34:41 PDT 2010


I should add, this problem does *not* strike if I use the cgi module
directly. It only seems to come in if I use the fancy framework around
it. I don't know why. Maybe it is due to the different locations of
main()? In both cases, it is defined in a mixin template, but in the
simple case, it goes import cgi -> mixin genericmain. In the fancy
case, it goes import fancyweb -> mixin fancymain, and it is fancyweb
that in turn imports cgi.

fancyweb.d

==
public import cgi;
mixin template fancymain {
   void main() { }
}
==

fancywebuser.d

==
import fancyweb;
mixin fancymain;
==


Vs:

cgi.d
===
mixin template genericmain {
 void main() {}
}
==

app.d
===
import cgi.d
mixin genericmain;
===



Changing from public import cgi to just import cgi in the user lib
fixed the problem for a while, but it came back as I made the program
larger.


Perhaps this is just an elusive bug rather than a design issue with
the templates?


More information about the Digitalmars-d mailing list