dmd
dmd copied to clipboard
importc: cannot use forward declaration of static function when building a library
While trying to build phobos as a library with a single call, dmd errors out with
error : no definition found for static `deflate_stored` in this module, statics defined in one module cannot be referenced from another
This boils down to compiling this C code with -lib:
static void static_fun();
void lib_fun()
{
static_fun();
}
static void static_fun()
{
}
yields:
Error: no definition found for static `static_fun` in this module, statics defined in one module cannot be referenced from another
Also note the missing file and line number.