DWT information, requirements and installation

Jesse Phillips jessekphillips at gmail.com
Fri Feb 15 19:48:36 PST 2008


On Fri, 15 Feb 2008 15:35:00 -0500, 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

I will begin by telling you what this output is telling you, after which 
I will respond to your other post, and then go into explanations for both 
me and "my colleagues" as to what brought us to our suggestions and 
assumptions we made during suggestion.

Your current compilation is telling you that it was not able to find the 
dwt libraries for witch to compile. The error has come about because you 
called dmd without providing the appropriate linker flags that will tell 
gcc what to link in. It also says that you have an older version of 
Tango, you need to use the SVN repository version now which does not use -
ltango-user-dmd.

"The 'weird' data I give is the output of the terminal in case anybody
really wants to think about it and try to suggest fixes."

The weird information that was referred is not compiler output, but 
inconsistent information that you provide. IE Frank gave you instrutions 
on installation:
http://www.digitalmars.com/webnews/newsgroups.php?
art_group=digitalmars.D.dwt&article_id=639

$ dsss build dwt
$ dsss install dwt

in dwt-samples dir do:
$ dsss build dwtexamples/helloworld/HelloWorld1.d

Your response:
got this back on both "dsss build"  and "dsss build
dwtexamples/helloworld/HelloWorld1.d"

This leads us to conclude you missed step 2 $ dsss install dwt
In a later post you write, "I have also found the file /dsss/rebuild.conf/
default  and changed its contents to 'dmd-linux-tango'"
http://www.digitalmars.com/webnews/newsgroups.php?
art_group=digitalmars.D.dwt&article_id=647

This is odd as I know of no such file and am unable to find it. Also it 
would suggest that dsss is installed incorrectly, it should not be in the 
root directory (and will not install itself there). However in either 
case, dsss seems to be working an thus this can be elegantly ignored.

"I use dmd to compile the programs I am writing or at least trying to
write. You and your colleagues suggest getting and using dsss and do not 
provide a traditional linux makefile for a normal make,install approach"

There is a good reason we suggest dsss over creating a makefile. 
Makefiles are blotted, not platform independent. DSSS does a great job of 
automation, but still needs some kinks worked out. Lastly using dmd will 
fail unless you successfully add all the needed linker commands.

"There is a major problem with your examples  project which I am trying to
isolate . It is not my download and install ,they have gone flawlessly .
The problem is in the dwt-examples which won't compile. Thats the only
area left which I have not achieved."

The examples compile for other users of the project. This leads to only 
one conclusion, your system has not been fully configured. In fact, most 
of your posted problems aren't even compiler errors, but instead linker 
errors. These linker errors are caused from not finding the needed files, 
ie the files are not installed correctly.

"Jesses post indicates he had not even read the originating post above. So
he went straight for my post by name . That tells me whats going on."

This is true I did not read doob's installation instructions my install 
already worked. I also apparently did not look over the output as closely 
as I should have, but instead I when with the command you called. Had I 
looked closer I would have been able to point out the clues of incorrect 
Tango version.

I would now like to refer back to a previous help of mine where I had 
been in another error.
http://www.digitalmars.com/webnews/newsgroups.php?
art_group=digitalmars.D.dwt&article_id=636

I was saying that the samples worked in linux and did not know what the 
imports were for. This was related to a big change in the structure of 
Tango that I had not yet been introduced to. This has not only led to me 
not following some of the errors, but after having resolved the problems 
on my computer I have gotten a better idea of what should happen during 
compile and what shouldn't.

So I would like to recap on what you should try next. Install the latest 
svn Tango, this my require uninstalling the current one. 


More information about the Digitalmars-d-dwt mailing list