CTFE with C functions not possible?

Rikki Cattermole via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Dec 31 04:15:42 PST 2015

On 01/01/16 1:14 AM, Shriramana Sharma wrote:
> Rikki Cattermole wrote:
>>> Is this possible or not?
>> No, source is not available.
> Why, is it because the D compiler is already linked to the C library (and
> hence knows where the functions are located and such), but not to my
> library? I mean, I even gave -L-lmylib and all that, but of course now I
> realize that that is only telling the *linker* about the lib. How do I tell
> the compiler to the lib? If Python CTypes can query and find out any library
> with the SO filename I throw at it, can't a D compiler?

You misunderstand, its hardcoded into the CTFE evaluator. That is what 
an intrinsic is.

More information about the Digitalmars-d-learn mailing list