Need Help on Compiling DWT2 in XP

Sam Hu samhu.samhu at
Mon Apr 6 04:58:20 PDT 2009

Hi Frank,

I re-built DWT2 with rake clean all and everything went smoothly and successfully;But when I tried to build a my own pragram (testDWT2.d)which is placed in the C:\TangoD\dwt2\org.eclipse.jface.snippets\EclipseJfaceSnippets\org\eclipse\jface\snippets\viewers folder with the command:rake jfacesnippets,it failed with below error:

C:\TangoD\dwt2>rake jfacesnippets
(in C:/TangoD/dwt2)
Building jfacesnippets[Snippet001TableViewer]
dmd.exe @C:\TangoD\dwt2\rsp
Building jfacesnippets[testDWT2]
dmd.exe @C:\TangoD\dwt2\rsp
ppets\testDWT2.d: module testDWT2 cannot read file 'ppets\testDWT2.d'
rake aborted!
compile error
C:/TangoD/dwt2/rakefile:274:in `buildApp'
(See full trace by running task with --trace)

I just have no idea how to compile my own program,although you have memtioned above,forgive me !
> > 3.Is dssss still workable to compile DWT2 program?
> Yes, you can just put all those -I and -J and -L into the dsss.conf
> But dwt2 is not to be build itself by dsss. And it is not installed into
> dsss.
I read the dsss document and referred to the dwt-sample dssss.conf file in the previous DWT,and then tried below:
My d folder now:
1.Copy all dwt2 lib files into dsss\lib;
2.copy all dwt2 res files into dsss\lib\res;
3.copy all dwt2 imp files (that's \java folder and \org folder under dwt2\imp into dsss\include\d,dsss\include folder now looks like below:
4.In d:\dex where is my own d program files.Say,here is a d program name testDWT2.d;
5.write a dsss.conf and save in d:\dex,the content of d:\dex\dsss.conf is as below:

# DWT dwt-samples top-level dsss.conf

buildflags+=-g -gc
buildflags+=-J$LIB_PREFIX/res -Jres

version(Windows) {
    # if no console window is wanted/needed use -version=gui
    version(gui) {
        buildflags+= -L/SUBSYSTEM:windows:5
    } else {
        buildflags+= -L/SUBSYSTEM:console:5
    buildflags+= -L/rc:java
    buildflags+= -L/rc:org
    buildflags += -L"zlib;libbz2"


6.when I compile with dsss build testDWT2.d,dozens of error msg :

D:\Laguage\Dex>dsss build testDWT2.d
testDWT2.d => testDWT2
+ c:\tangoD\dsss\bin\rebuild.exe -Idsss_imports\ -I. -S.\ -Ic:\tangoD\dsss\inclu
de\d -Sc:\tangoD\dsss\lib\  -Ic:\tangoD\dsss\include\d -Sc:\tangoD\dsss\lib  -oq
dsss_objs\D  testDWT2.d -oftestDWT2
c:/tangoD/dsss/bin\..\include\d\java\lang\util.di(296): Error: need -Jpath switc
h to import text file
c:/tangoD/dsss/bin\..\include\d\java\lang\util.di(296): Error: cannot evaluate o
pCall("","") at compile time
c:/tangoD/dsss/bin\..\include\d\java\lang\util.di(206): template instance java.l
ang.util.getImportData!("") error
Error: cannot evaluate opCall("","org.eclipse.swt.internal.SWTMessages.propertie
s") at compile time
Command c:\tangoD\dsss\bin\rebuild.exe returned with code 1, aborting.
Error: Command failed, aborting.


This is all what I have done with dsss+tango+dwt2 but it seems just what a mess.So it would be grateful if you would like to write a simple step by step guideline the newbies like me to set up a working environment as quickly as possible.

Thanks and best regards,

More information about the Digitalmars-d-dwt mailing list