On Wednesday, 3 August 2016 at 15:14:24 UTC, Kagamin wrote:
On Wednesday, 3 August 2016 at 15:08:51 UTC, llaine wrote:
So basically I have to create wrapper.c ?

Yes, but you should write it in D. Runtime initialization is at https://dlang.org/phobos/core_runtime.html#.Runtime

Okay I tried to do something like this


import std.stdio;
import core.runtime;

extern(C)
{

  void foo(string str)
  {
    writeln(str);
  }

}

void main(){
  Runtime.initialize();
  Runtime.terminate();
}

Am I doing it wrong ?
Still getting a Segmentation fault

Reply via email to