On Saturday, 24 July 2021 at 08:41:20 UTC, frame wrote:

I cannot reproduce it with a standalone example app

Meanwhile I can, it seems a linking problem or I'm doing something wrong? Please consider:

```d

// dmd -m64 -L/DLL -version=lib test.d -of=common.dll
// dmd -m64 test.d

// test.d
version (lib)
{
    import core.sys.windows.dll;
    import std.stdio;

    mixin SimpleDllMain;

    export extern (C) void test()
    {
        writeln("test() called");
    }
}
else
{
    import std.stdio;

    pragma(lib, "common.lib");
    extern (C) void test();

    void main()
    {
        // No trace info anymore if extern function is called
        // test();

        try
        {
            throw new Exception("test");
        }
        catch (Throwable e)
        {
            writeln("trace: ", e.info);
            writeln("whatever");
        }
    }
}
```

Reply via email to