Greeings!
My c to d header wrapper file curl_d.c (just 2 lines):
#include
#include //seems with or without this doesn't matter
Trying A: My main c file :direct_call_c.c:
#include
#include
#include "curl_d.c"
{...}
dmd -m64 direct_call_c.c curl_d.c curl.lib
...
direct_call_c.obj : err
On Tuesday, 20 February 2024 at 18:33:42 UTC, Carl Sturtivant
wrote:
1.
When the resulting executable runs it will have D call C which
in turn calls D. In that last D (the D files replacing some C
files), if I throw an exception and don't catch it in the D
files that replace some C files, will
On Wednesday, 21 February 2024 at 12:45:50 UTC, Bastiaan Veelo
wrote:
What do you mean by "need"? You can call
https://dlang.org/phobos/core_stdc_stdlib.html#.exit from D:
Of course, but does it respect D shutdown?
Output:
```
onlineapp._sharedStaticDtor_L11_C1
```
So it does run module dest
On Tuesday, 20 February 2024 at 18:33:42 UTC, Carl Sturtivant
wrote:
2.
The C source calls exit() from C's stdlib, and D needs to
terminate properly.
What do you mean by "need"? You can call
https://dlang.org/phobos/core_stdc_stdlib.html#.exit from D:
```d
import std.stdio;
void main()
{