DWT information, requirements and installation
no at spam.invalid
Fri Feb 15 15:17:26 PST 2008
Ty Tower wrote:
> Just to demonstrate ,this is the output I get trying to compile doobs example at the start of this thread. So surely the output suggests whats missing or what the compiler is looking for? I am not familiar with the inner workings and what the undefined references mean but surely the command line out would tell someone experienced whether it is getting it right? "gcc main.o ........... -lm "
> [tytower at linuxbox dwt-linux]$ dmd MyStuff/main.d
> gcc main.o -o main -m32 -Xlinker -L/usr/bin/../lib -ltango-user-dmd -ltango-base-dmd -lpthread -lm
> main.o:(.data+0x38): undefined reference to `_D3dwt7widgets7Display12__ModuleInfoZ'
> main.o:(.data+0x3c): undefined reference to `_D3dwt7widgets5Shell12__ModuleInfoZ'
> main.o: In function `_Dmain':
> MyStuff/main.d:(.text._Dmain+0x8): undefined reference to `_D3dwt7widgets7Display7Display7__ClassZ'
> MyStuff/main.d:(.text._Dmain+0x13): undefined reference to `_D3dwt7widgets7Display7Display5_ctorMFZC3dwt7widgets7Display7Display'
> MyStuff/main.d:(.text._Dmain+0x1b): undefined reference to `_D3dwt7widgets5Shell5Shell7__ClassZ'
> MyStuff/main.d:(.text._Dmain+0x29): undefined reference to `_D3dwt7widgets5Shell5Shell5_ctorMFC3dwt7widgets7Display7DisplayZC3dwt7widgets5Shell5Shell'
> collect2: ld returned 1 exit status
> --- errorlevel 1
All the missing symbols are from DWT, since they all start with
'_D3dwt'. So you need to build dwt, and then link with it.
Or you can use dsss, which allows you to skip building dwt:
dsss build main.d
If everything is set up correctly, that command will compile the needed
dwt modules, and link them all into the executable. That's what I do on
linux myself currently.
More information about the Digitalmars-d-dwt