October 03, 2004
Hi,
How can I export classes in a dll?

I did a quick test on the mydll sample but it didn't work

In mydll2.d file I defined the class

    export class MyClass {
                void print() { printf("Hello\n"); }
            }

in mydll.d file I added

        export class MyClass;

In the test.d file there's import mydll.d

MyClass cl = new MyClass();
cl.print();

the compiler gives the following error msg:
mydll.d(2): class MyClass is forward referenced when looking for 'print'
what's wrong??