How to build program with DWT2 and DMD2?

JohnnyK johnnykinsey at
Thu Aug 8 06:07:12 PDT 2013

On Wednesday, 7 August 2013 at 18:55:53 UTC, Druzhinin Alexandr 
> 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
> > 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

I know DWT works because I am able to compile the base and I am 
able to compile the snippets as specified by the DWT Author's 
instructions.  Anyway thanks for the information but these are no 
where close to the instructions that the author of DWT said to 
follow.  I am a bit concerned about deleting and copying files 
around because I would like to be able to perform painless 
upgrades of DWT without trying to remember "Oh yeah I copied 
utils.d over here."  Or worse I go to perform these copies and 
those files are no longer called this or are just missing then 
what would I do?  Because I could not get the authors 
instructions to work tells me the author needs to be aware and 
needs to either fix the instructions or fix the layout of the 
distribution.  Maybe some part of the Base did not compile or 
something like that.  I have no idea it could be anything when 
you are trying to compile code on another machine from the one 
that the code was developed on.  I wish DWT was offered as a 
binary distro instead of source code.  Either way I would rather 
to always follow the instructions given to me by the author.  Now 
what I may do is try compiling with dmd directly instead of using 
rdmd, I was just not sure what libraries are required is all.

More information about the Digitalmars-d-dwt mailing list