On Monday, 31 May 2021 at 20:32:11 UTC, kinke wrote:
On Monday, 31 May 2021 at 19:21:52 UTC, data pulverizer wrote:
ldc2 jbasic.d -O3 -link-defaultlib-shared --betterC --boundscheck=off -nogc -shared -of=jbasic.so

The problem is almost certainly `-betterC`, which disables linking against Phobos and druntime.

Thanks - I should have know that one! I've removed the flag but now I'm getting the following error when I try to call the function:

```
Aborting from src/core/time.d(2131) MonoTimeImpl!(ClockType.normal) failed to get the frequency of the system's monotonic clock.
signal (6): Aborted
in expression starting at REPL[2]:1
gsignal at x86_64-linux-gnu/libc.so.6 (unknown line)
abort at x86_64-linux-gnu/libc.so.6 (unknown line)
_D4core8internal5abortQgFNbNiNfMAyaMQemZv at /lib64/libphobos2.so.0.90 (unknown line)
_D4core4time__T12MonoTimeImplVEQBdQBb9ClockTypei0ZQBj8currTimeFNbNdNiNeZSQCtQCr__TQCpVQCei0ZQCz
 at dmd/current/lib64/libphobos2.so.0.90 (unknown line)
_D3std6random13bootstrapSeedFNbNiZm at dmd/current/lib64/libphobos2.so.0.90 (unknown line) _D3std6random__T17unpredictableSeedTmZQwFNbNdNiNeZm at dmd/current/lib64/libphobos2.so.0.90 (unknown line) _D3std6random17unpredictableSeedFNbNdNiNeZk at dmd/current/lib64/libphobos2.so.0.90 (unknown line)

```
  • How to compile Phobos with ot... data pulverizer via Digitalmars-d-learn
    • Re: How to compile Phobo... kinke via Digitalmars-d-learn
      • Re: How to compile P... data pulverizer via Digitalmars-d-learn
        • Re: How to compi... Steven Schveighoffer via Digitalmars-d-learn
          • Re: How to c... data pulverizer via Digitalmars-d-learn
            • Re: How... Steven Schveighoffer via Digitalmars-d-learn
              • Re:... data pulverizer via Digitalmars-d-learn
                • ... Adam D. Ruppe via Digitalmars-d-learn
                • ... Steven Schveighoffer via Digitalmars-d-learn
                • ... data pulverizer via Digitalmars-d-learn
                • ... Steven Schveighoffer via Digitalmars-d-learn
                • ... data pulverizer via Digitalmars-d-learn
                • ... bachmeier via Digitalmars-d-learn

Reply via email to