D.gnu - _Dmodule_ref question
- Johannes Pfau (19/19) Feb 05 2012 Is there a reason why _Dmodule_ref can't be defined in a d source file?
Is there a reason why _Dmodule_ref can't be defined in a d source file?
---------------------
module test;
extern(C)
{
void* _Dmodule_ref = null;
int printf(in char* format, ...);
void main()
{
printf("Hello, %s!".ptr, "no runtime".ptr);
}
}
----------------------
doesn't compile. but removing the _Dmodule_ref declaration from test.d
and creating a test.c file:
----------------------
void* _Dmodule_ref;
----------------------
compiles.
Feb 05 2012








Johannes Pfau <nospam example.com>