February 05, 2012 _Dmodule_ref question | ||||
|---|---|---|---|---|
| ||||
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.
| ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply