Building DWT on Windows...

Jacob Carlborg doob at me.com
Wed Oct 24 12:39:11 PDT 2012


On 2012-10-24 17:04, "Adrien Tétar" <adri-from-59 at hotmail.fr>" wrote:
> Hi,
>
> I have pulled DWT from github repo.
> https://github.com/d-widget-toolkit/dwt
>
> Then I ran
> rdmd build base swt
>
> ..and got the following log
> Building dwt-base
> workdir=>C:\Users\Adrien\Documents\GitHub\dwt\base\src
> dmd.exe @C:\Users\Adrien\Documents\GitHub\dwt\rsp
> lib.exe @C:\Users\Adrien\Documents\GitHub\dwt\rsp >
> C:\Users\Adrien\Documents\Gi
> tHub\dwt\olog.txt
> Building org.eclipse.swt.win32.win32.x86
> workdir=>C:\Users\Adrien\Documents\GitHub\dwt\org.eclipse.swt.win32.win32.x86\sr
>
> c
> dmd.exe @C:\Users\Adrien\Documents\GitHub\dwt\rsp
> lib.exe @C:\Users\Adrien\Documents\GitHub\dwt\rsp >
> C:\Users\Adrien\Documents\Gi
> tHub\dwt\olog.txt
>
> ..but then I have no idea of what I should do.
> Import libs from lib/ folder ?
> ...?
>
> Thanks in advance for your help.

Yeah, the build will create libraries in the "lib" folder. You can build 
the snippets with "rdmd build base swt swtsnippets". A hello world would 
look something like this:

module main;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

void main ()
{
     auto display = new Display;

     scope (exit)
         display.dispose;

     auto shell = new Shell;

     shell.setText = "asd";

     shell.open;

     while (!shell.isDisposed)
         if (!display.readAndDispatch)
             display.sleep;
}

dmd main.d -Iorg.eclipse.swt.win32.win32.x86/src -Ibase/src -J 
org.eclipse.swt.win32.win32.x86/res <libraries>

Link with these libraries:

https://github.com/d-widget-toolkit/dwt/blob/master/build.d#L92

Located in org.eclipse.swt.win32.win32.x86/lib.

I'm not really familiar with building on Windows, it was a while ago. 
You can also just build your application from source.

-- 
/Jacob Carlborg


More information about the Digitalmars-d-dwt mailing list