# How to build program with DWT2 and DMD2?

Druzhinin Alexandr news at digitalmars.com
Wed Aug 7 11:55:52 PDT 2013

On 08.08.2013 00:03, JohnnyK wrote:>
> It looks to be unable to find the static libs now.  How do people use
> this library?  Do they work in the dwt folder and just use that build.d
> file to compile with?  Again I would like to know the layout of a
> typical programmers workstation that uses DWT for the GUI parts of their
> application?  Is anyone using DWT today?
> I appreciate all your help Jacob but I didn't think it would be this
> hard or take this long just to build and compile a program that just
> shows a window.  Has anyone ever tried to install D and DWT on a virgin
> machine then start a clean project to build a simple application like
> this before?  Maybe there is something I need to add to my PATH
> environment variable or something like that which would make this
> easier?  The command line is longer than the code I am trying to compile
> at this point.

DWT works fine for me at least.
Try the following:
cd /path/to/dwt
dmd build.d

build base

del .\imp\java\lang\util.di

copy  .\base\src\java\lang\util.d .\imp\java\lang\

build swt

del .\imp\org\eclipse\swt\internal\Library.di

copy
.\org.eclipse.swt.win32.win32.x86\src\org\eclipse\swt\internal\Library.d
.\imp\org\eclipse\swt\internal

then build your app using (win32):

dmd
-Ipath\to\dwt\imp
-Jpath\to\dwt\org.eclipse.swt.win32.win32.x86\res
path\to\dwt\lib\org.eclipse.swt.win32.win32.x86.lib
path\to\dwt\lib\olepro32.lib
path\to\dwt\lib\oleacc.lib
path\to\dwt\lib\usp10.lib
path\to\dwt\lib\msimg32.lib
path\to\dwt\lib\opengl32.lib
path\to\dwt\lib\shlwapi.lib
path\to\dwt\lib\dwt-base.lib
yourapp.d

may be you'll need to fix the paths I wrote - I think it won't be hard