Hello everyone,

I apologize in advance for my english, I'm french and not good in the language of Shakespeare.

I am running Mac OS X 10.9 and I use the DMD 2 compiler.
I try to compile a basic script that uses DWT (https://github.com/d-widget-toolkit/dwt-mac) :

module main;

import dwt.widgets.Button;
import dwt.widgets.Display;
import dwt.widgets.Event;
import dwt.widgets.Listener;
import dwt.widgets.Shell;

void main (){
        Display display = new Display ();
        Shell shell = new Shell (display);
        
        Button button = new Button (shell, DWT.NONE);
        button.setSize(100,100);
        button.setText("Click me");
        
        shell.pack;
        shell.open;
        
        
        while (!shell.isDisposed ()){
                if (!display.readAndDispatch ()) display.sleep ();
        }
}

But when I compile, I have a lot of error (I use Xamarin).
Is that I forget things or is that I do not compile it right (dmd -debug -gc "main.d" "-I/usr/share/dmd/src/" "-odobj/Debug" "-of/Users/amehat/Projects/D-test/D-test/bin/Debug/D-test")?

md "@/var/folders/80/82nj5n0n65196c_jq7ftllqw0000gn/T/tmp3f6ab167.tmp" dwt/browser/AppFileLocProvider.d(107): Deprecation: octal literals 0700 are deprecated, use std.conv.octal!700 instead dwt/browser/AuthenticationEvent.d(28): Error: { } expected following aggregate declaration dwt/browser/AuthenticationEvent.d(28): Error: semicolon expected, not '{' dwt/browser/AuthenticationEvent.d(28): Error: Declaration expected, not '{' dwt/browser/AuthenticationEvent.d(53): Error: function declaration without return type. (Note that constructors are always named 'this') dwt/browser/AuthenticationEvent.d(53): Error: no identifier for declarator AuthenticationEvent(Widget widget) dwt/browser/AuthenticationEvent.d(71): Error: unrecognized declaration dwt/browser/AuthenticationListener.d(27): Error: { } expected following aggregate declaration dwt/browser/AuthenticationListener.d(27): Error: semicolon expected, not '{' dwt/browser/AuthenticationListener.d(27): Error: Declaration expected, not '{' dwt/browser/AuthenticationListener.d(58): Error: unrecognized declaration dwt/browser/Browser.d(531): Error: semicolon expected following function declaration
dwt/browser/Browser.d(531): Error: semicolon expected, not '{'
dwt/browser/Browser.d(531): Error: Declaration expected, not '{'
dwt/browser/Browser.d(533): Error: Declaration expected, not 'if'
dwt/browser/Browser.d(534): Error: Declaration expected, not 'return'
dwt/browser/Browser.d(994): Error: unrecognized declaration
dwt/browser/BrowserFunction.d(76): Error: function declaration without return type. (Note that constructors are always named 'this') dwt/browser/BrowserFunction.d(76): Error: no identifier for declarator BrowserFunction(Browser browser, String name) dwt/browser/BrowserFunction.d(80): Error: function declaration without return type. (Note that constructors are always named 'this') dwt/browser/BrowserFunction.d(80): Error: no identifier for declarator BrowserFunction(Browser browser, String name, bool create) dwt/browser/BrowserFunction.d(139): Error: no identifier for declarator Object function(Object[] arguments)
Exit code 1
Construction terminée -- 23 erreurs, 0 avertissement

Reply via email to