Thread overview | |||||
---|---|---|---|---|---|
|
September 23, 2020 Is it possible to create a library with ldc and port it to LLVM | ||||
---|---|---|---|---|
| ||||
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, 2020 Re: Is it possible to create a library with ldc and port it to LLVM | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ruby The Roobster | 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, 2020 Re: Is it possible to create a library with ldc and port it to LLVM | ||||
---|---|---|---|---|
| ||||
Posted in reply to Johan | 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.
|
Copyright © 1999-2021 by the D Language Foundation