On Thu, Sep 24, 2020 at 9:35 AM Ruby The Roobster via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
Can you create a library(.lib) with ldc and port it to clang++?
e.g.

//test.d
module test;
import std.stdio;
void hi()
{
writeln("hello");
}

//test.cpp(links to test.lib which contains test.hi
#include <iostream>
extern "D" void hi();
void main() {
hi();
}
//Hopefully prints "hi"

Of course. This is critically important functionality for many users.
Except, you should use `extern(C++)` in your D code, and no need to extern in your C++ code.