version and extern problems

Walter Bright newshound1 at digitalmars.com
Tue Jul 10 12:34:29 PDT 2007


Chris Miller wrote:
> I don't know; why not let it just be a string literal...
> 
> version(Windows)
>     const char[] mylibcall = "Windows";
> else
>     const char[] mylibcall = "C";
> 
> extern(mylibcall) void function() foo;

It's the old chicken-and-egg problem of forward references.



More information about the Digitalmars-d mailing list