Compiling phobos with -cov

BCS BCS at pathlink.com
Mon Jun 26 08:44:38 PDT 2006


Don Clugston wrote:
> Has anyone had any success in compiling phobos with -cov -unittest?
> Using DMD 0.161 - Windows, it compiles without warnings, but running the 
> executable just prints:
> 
> C:\dmd\src\phobos>dmd -cov -unittest unittest
> c:\dmd\bin\..\..\dm\bin\link.exe unittest,,,user32+kernel32/noi;
> 
> C:\dmd\src\phobos>unittest
> Error: circular initialization dependency with module object
> 
> 
> Am I doing something wrong?
> (I copied my phobos.lib into dmd\lib to overwrite the existing one).

this is (I think) a known issue with dmd and circular imports. -cov adds 
a static constructor that somehow gets interpreted by the runtime as a 
link in a circular dependency. Until Walter fixes this (please oh please 
do this soon!!) the best thing I have considered is building with -cov 
on one or more modules (but not all) at a time.



More information about the Digitalmars-d-learn mailing list