LDC / BetterC / _d_run_main

Adam D. Ruppe destructionator at gmail.com
Sat Mar 10 02:33:12 UTC 2018


Eh, you can simplify it a lot by just writing your own C main 
(legal with or without betterC btw)

---
import core.stdc.stdio;

extern(C)
int main(int argc, char** argv) {
	printf("hello world, %s\n", argc > 1 ? argv[1] : "user");
	return 0;
}
---

that should work with any compiler, with or without -betterC.


More information about the Digitalmars-d-learn mailing list