Making a forward declaration of a C symbol defined in another CU

Joakim dlang at joakim.fea.st
Thu Dec 20 08:28:09 UTC 2018


On Thursday, 20 December 2018 at 08:17:58 UTC, Alexander Nicholi 
wrote:
> I'm developing for Windows, 64-bit at the moment with MSVC and 
> DMD. I have this C code file, config.c:
>
> [...]

This belongs in the Learn forum:

https://forum.dlang.org/group/learn

See the docs on interfacing to C globals, you need the additional 
`extern` storage class:

https://dlang.org/spec/interfaceToC.html#c-globals
https://dlang.org/spec/declaration.html#extern


More information about the Digitalmars-d mailing list