February 06, 2011 DMC pragma startup or equivalent? | ||||
---|---|---|---|---|
| ||||
Hello, I need to compile a program in C (not C++) mode and I also need a function to be executed as start-up before any other functions. IOW, I need something like Borland C "#pragma startup xxx" How could I do this with DMC? Thanks Andi |
February 19, 2011 Re: DMC pragma startup or equivalent? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andi Jahja | Andi Jahja wrote:
> I need to compile a program in C (not C++) mode and I also need a
> function to be executed as start-up before any other functions.
>
> IOW, I need something like Borland C "#pragma startup xxx"
>
> How could I do this with DMC?
Probably the easiest way is to make a C++ file (DMC will compile C++ files) and put the code in a static constructor.
|
Copyright © 1999-2021 by the D Language Foundation