rdmd & exception def & multiple files

Charles Hixson charleshixsn at earthlink.net
Wed Aug 29 16:52:14 PDT 2012


On 08/29/2012 04:15 PM, Andrei Alexandrescu wrote:
> On 8/29/12 3:47 PM, Charles Hixson wrote:
>> Where should I look to better understand
>> rdmd? I expected to need to list all the local files that were needed,
>> but clearly that's the wrong approach.
>
> http://dlang.org/rdmd.html
>
> To my surprise, it's not in the top Google search results. However,
> Dmitry's shadow page is: http://blackwhale.github.com/rdmd.html
>
> Andrei
Thank you.  Unfortunately, that page doesn't address the symptoms that 
I've been experiencing, which while they don't halt development 
certainly confuse it.

It's starting to look as if while I use rdmd I'll need to keep 
everything in one file, as otherwise I can't share exceptions between 
classes.  (And I'm only guessing that the problem is limited to 
exceptions, as I haven't tested with other functions.)

Since the small test programs DO call successfully between different 
files (including for exceptions) I don't really have a clue as to what's 
going on, except that it appears to happen during linking.  And 
combining the routines into one file appears to "fix" the problem.  And 
that dmd doesn't seem to have the same problem.  (I.e., if I add a dummy 
main routine to the avl.d file, then
dmd -unittest avl.d utils.d
compiles and executes without problems, even though it doesn't do anything.

FWIW:
charles at mandala1:~$ dmd
DMD64 D Compiler v2.060
Copyright (c) 1999-2012 by Digital Mars written by Walter Bright
Documentation: http://www.dlang.org/index.html
Usage:


More information about the Digitalmars-d-learn mailing list