Thread overview
Is it possible to create a library with ldc and port it to LLVM
Sep 23
Johan
September 23
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"
September 23
On Wednesday, 23 September 2020 at 22:59:25 UTC, Ruby The Roobster 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"

See
https://stackoverflow.com/questions/26923976/calling-a-d-function-directly-from-c
September 23
On Wednesday, 23 September 2020 at 23:31:49 UTC, Johan wrote:
> See
> https://stackoverflow.com/questions/26923976/calling-a-d-function-directly-from-c

Thanks.