On Thursday, 8 August 2013 at 13:07:15 UTC, JohnnyK wrote:
Ok problem resolved. I can now compile DWT applications from another directory structure outside of the dwt distribution directories. Below is the commandline that I used and I did not have to delete or copy or follow any other compile instructions other than what the Author has in his Readme file.

dmd -IC:\GITClones\dwt\imp\ -JC:\GITClones\dwt\org.eclipse.swt.win32.win32.x86\res\ -m32 -op -od.\obj\ -of.\bin\hello.exe .\hello.d -L/SUBSYSTEM:WINDOWS:4.0 -L+advapi32.lib -L+comctl32.lib -L+comdlg32.lib -L+gdi32.lib -L+kernel32.lib -L+shell32.lib -L+ole32.lib -L+oleaut32.lib -L+olepro32.lib -L+oleacc.lib -L+user32.lib -L+usp10.lib -L+msimg32.lib -L+opengl32.lib -L+shlwapi.lib -L+dwt-base.lib -L+org.eclipse.swt.win32.win32.x86.lib -L+C:\GITClones\dwt\lib\

I copied most of that command line from the rsp file that is generated by build.d when compiling snippets. I don't know if I need all these libs in here.

hello.d is as follows.

/* A Simple DWT window */
module main;

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

void main ()
{
    auto display = new Display;
    auto shell = new Shell;
    shell.open();

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

    display.dispose();
}

You will need to place hello.d in a directory of your choice and create a org and bin directory in the directory that hello.d is located.

Also if you wanted to use rdmd below is the commandline I was able to get working.

rdmd --build-only -IC:\GITClones\dwt\imp\ -JC:\GITClones\dwt\org.eclipse.swt.win32.win32.x86\res\ -L/SUBSYSTEM:WINDOWS:4.0 -L+advapi32.lib -L+comctl32.lib -L+comdlg32.lib -L+gdi32.lib -L+kernel32.lib -L+shell32.lib -L+ole32.lib -L+oleaut32.lib -L+olepro32.lib -L+oleacc.lib -L+user32.lib -L+usp10.lib -L+msimg32.lib -L+opengl32.lib -L+shlwapi.lib -L+dwt-base.lib -L+org.eclipse.swt.win32.win32.x86.lib -L+C:\GITClones\dwt\lib\ hello.d

Anyway I would like to determine just what libs are required and which ones are not needed unless dmd's linker is only going to link in the required libs? Not sure how it's linker works maybe I will do some more reading on it now.

Again I want to thank everyone for their help on this and I think I am on my way to building some GUI's with DWT :)

Reply via email to