Cyclic dependency error

Steven Schveighoffer schveiguy at yahoo.com
Tue Nov 7 14:05:41 UTC 2017


On 11/7/17 7:49 AM, Tony wrote:
> My program compiled, but when I ran it I got this error message:
> 
> object.Error at src/rt/minfo.d(371): Cyclic dependency between module 
> variable and main
> variable* ->
> misc ->
> main* ->
> variable*
> 
> 
> I take it that the -> represents a dependency from the module on that 
> line, to the module on the line below. My question is what do the 
> asterisks represent?

The asterisks represent modules with module ctors/dtors. So misc is an 
intermediate step, but has no module ctor/dtor.

A cycle between a module with a ctor and itself is OK, as long as it 
only goes through such import paths.

-Steve


More information about the Digitalmars-d-learn mailing list