Re: LDC / BetterC / _d_run_main

2018-03-10 Thread Richard via Digitalmars-d-learn
On Saturday, 10 March 2018 at 10:57:05 UTC, Johan Engelen wrote: On Saturday, 10 March 2018 at 07:54:33 UTC, Mike Franklin wrote: On Saturday, 10 March 2018 at 02:25:38 UTC, Richard wrote: Hi, I've been trying to see if I can get an mbed project to work with Dlang basically compiling D code

Re: LDC / BetterC / _d_run_main

2018-03-10 Thread Uknown via Digitalmars-d-learn
On Saturday, 10 March 2018 at 12:00:12 UTC, Richard wrote: On Saturday, 10 March 2018 at 07:54:33 UTC, Mike Franklin wrote: On Saturday, 10 March 2018 at 02:25:38 UTC, Richard wrote: [snip] Based on the above this seems to work fine so I'll use this since it's the simplest option. ```

Re: LDC / BetterC / _d_run_main

2018-03-10 Thread Richard via Digitalmars-d-learn
On Saturday, 10 March 2018 at 07:54:33 UTC, Mike Franklin wrote: On Saturday, 10 March 2018 at 02:25:38 UTC, Richard wrote: Hi, I've been trying to see if I can get an mbed project to work with Dlang basically compiling D code for use on a Cortex-M Proccessor You might be interested in the

Re: LDC / BetterC / _d_run_main

2018-03-10 Thread Johan Engelen via Digitalmars-d-learn
On Saturday, 10 March 2018 at 07:54:33 UTC, Mike Franklin wrote: On Saturday, 10 March 2018 at 02:25:38 UTC, Richard wrote: Hi, I've been trying to see if I can get an mbed project to work with Dlang basically compiling D code for use on a Cortex-M Proccessor You might be interested in the

Re: LDC / BetterC / _d_run_main

2018-03-09 Thread Mike Franklin via Digitalmars-d-learn
On Saturday, 10 March 2018 at 02:25:38 UTC, Richard wrote: Hi, I've been trying to see if I can get an mbed project to work with Dlang basically compiling D code for use on a Cortex-M Proccessor You might be interested in the following, if you're not already aware: *

Re: LDC / BetterC / _d_run_main

2018-03-09 Thread Adam D. Ruppe via Digitalmars-d-learn
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

LDC / BetterC / _d_run_main

2018-03-09 Thread Richard via Digitalmars-d-learn
Hi, I've been trying to see if I can get an mbed project to work with Dlang basically compiling D code for use on a Cortex-M Proccessor So far I've been using the latest release of LDC with the -BetterC Flag From what I can gather, normally without -BetterC it works like this: * main() -