rdmd & exception def & multiple files
Charles Hixson
charleshixsn at earthlink.net
Wed Aug 29 13:14:37 PDT 2012
Is the following expected?
When I put the exception:
class LogicError : Exception
{
this( string file = __FILE__, size_t line = __LINE__, Throwable
next = null )
{
super( "Internal logic error", file, line, next );
}
}
In the same file as the rest of the program,
rdmd --main -unittest avl.d
had no trouble with it, but when I put it in a separate file,
while:
dmd -c -unittest avl.d utils.d
accepted it without complaint, rdmd responded with:
rdmd --main -unittest avl.d utils.d
/tmp/.rdmd-1000/rdmd-avl.d-EFC2A8F3F9817BAA59A3A00532D5696F/objs/avl.o:
In function
`_D3avl3AVL6insertMFKC3avl3AVL4NodeKC3avl3AVL4NodeKbZC3avl3AVL4Node':
/tmp/.rdmd-1000/stubmain.d:(.text._D3avl3AVL6insertMFKC3avl3AVL4NodeKC3avl3AVL4NodeKbZC3avl3AVL4Node+0x10d):
undefined reference to `_D5utils10LogicError7__ClassZ'
/tmp/.rdmd-1000/stubmain.d:(.text._D3avl3AVL6insertMFKC3avl3AVL4NodeKC3avl3AVL4NodeKbZC3avl3AVL4Node+0x144):
undefined reference to
`_D5utils10LogicError6__ctorMFAyamC6object9ThrowableZC5utils10LogicError'
/tmp/.rdmd-1000/stubmain.d:(.text._D3avl3AVL6insertMFKC3avl3AVL4NodeKC3avl3AVL4NodeKbZC3avl3AVL4Node+0x273):
undefined reference to `_D5utils10LogicError7__ClassZ'
/tmp/.rdmd-1000/stubmain.d:(.text._D3avl3AVL6insertMFKC3avl3AVL4NodeKC3avl3AVL4NodeKbZC3avl3AVL4Node+0x2aa):
undefined reference to
`_D5utils10LogicError6__ctorMFAyamC6object9ThrowableZC5utils10LogicError'
/tmp/.rdmd-1000/rdmd-avl.d-EFC2A8F3F9817BAA59A3A00532D5696F/objs/avl.o:
In function `_D3avl3AVL9delLftBalMFKC3avl3AVL4NodeKbZC3avl3AVL4Node':
/tmp/.rdmd-1000/stubmain.d:(.text._D3avl3AVL9delLftBalMFKC3avl3AVL4NodeKbZC3avl3AVL4Node+0x3f):
undefined reference to `_D5utils10LogicError7__ClassZ'
/tmp/.rdmd-1000/stubmain.d:(.text._D3avl3AVL9delLftBalMFKC3avl3AVL4NodeKbZC3avl3AVL4Node+0x76):
undefined reference to
`_D5utils10LogicError6__ctorMFAyamC6object9ThrowableZC5utils10LogicError'
collect2: ld returned 1 exit status
--- errorlevel 1
Is this expected?
More information about the Digitalmars-d-learn
mailing list