http://d.puremagic.com/issues/show_bug.cgi?id=4328
Summary: templated unittests fail to link when instantiated from other file if compiler order isn't correct Product: D Version: D2 Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: schvei...@yahoo.com --- Comment #0 from Steven Schveighoffer <schvei...@yahoo.com> 2010-06-16 06:46:44 PDT --- testunittest.d: struct S(T) { unittest { assert(0); } } testunittestmain.d: import testunittest; void main() { S!int s; } When compiled this way: dmd -unittest testunittest.d testunittestmain.d The following error occurs: testunittest.o: In function `_D12testunittest8__T1STiZ1S11__unittest3FZv': testunittestmain.d:(.text._D12testunittest8__T1STiZ1S11__unittest3FZv+0x9): undefined reference to `_D12testunittest15__unittest_failFiZv' collect2: ld returned 1 exit status If I compile this way: dmd -unittest testunittestmain.d testunittest.d The compiler generally has no problem with order of files for linking, I would expect the same here. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------