Hello. I am learning how to translate C headers to D. But how do I compile it? I am stuck with this.

I have 4 files in the same directory: main.d, something.d, some.h, some.c

some.h:
//header guards
int add(int a, int b);

some.c:
#include "some.h"
int add(int a, int b) { return a+b; }

something.d:
module something;
int add(int a, int b);

main.d:
import std.stdio: writeln;
import something;

void main() { writeln("5+7=", add(5, 7); }

How do I compile this correctly?

Thank you for your time.


Reply via email to