Last update October 8, 2007

Doc Comments /
Interface To C

Interfacing to C


Add your comments here...

Calling D functions from C

There is a short section on calling D functions from C, but as it has no subheading it is not obvious that the subject has changed from D calling to C.

extern (C) int foo;

extern (C) int foo; creates a new foo variable in D, but is just a definition of an external variable in C.

the usual workaround is to put all data definitions in a separate module, that is import from the function defs (but the resulting data object code is never linked in)


FrontPage | News | TestPage | MessageBoard | Search | Contributors | Folders | Index | Help | Preferences | Edit

Edit text of this page (date of last change: October 8, 2007 16:17 (diff))