d-widget-toolkit / org.eclipse.swt.win32.win32.x86

5 stars 6 forks source link

Error with D 2.062 (missing function in generated .di) #12

Closed jmcabo closed 11 years ago

jmcabo commented 11 years ago

Dwt compiles fine under D 2.062, but when compiling a project that uses dwt2, I get the following error:

    C:\dwt2\imp\org\eclipse\swt\internal\Library.di(14): Error: buildSWT_VERSION cannot be interpreted at compile time, because it has no available source code

For some reason, the function buildSWT_VERSION() is not included in the .di interface file. If I change it to be a template, then all works fine:

    private T buildSWT_VERSION (T major, T minor) {
        return major * 1000 + minor;
    }

After this change, dwt works fine with D 2.062 in my project.

jacob-carlborg commented 11 years ago

Fixed in https://github.com/d-widget-toolkit/org.eclipse.swt.win32.win32.x86/commit/c2d391d3ec4278c2a3146c7f1db8c0c896582c2f.