Linktime unresolved reference

jfondren julian.fondren at gmail.com
Sun Aug 22 15:53:07 UTC 2021


On Sunday, 22 August 2021 at 15:34:49 UTC, donallen wrote:
> Any ideas/suggestions?

Does this link?

```d
void main() {
     import std.stdio : writeln;

     writeln(1.0f);
}
```

That's enough to require that symbol:

```d
$ dmd havefp.d
$ nm -D havefp|grep -i 
_D3std4math8hardware20FloatingPointControl8roundingFNaNbNdNiNeZk
0000000000092a70 W 
_D3std4math8hardware20FloatingPointControl8roundingFNaNbNdN
```

If it doesn't link, my guess is that your platform isn't giving 
std.math.hardware the versions its wants, and perhaps that adding 
some -version=... flags to your command might get it to compile, 
and expose what your setup is missing.

If it does link, my only guess is that you're including an .o 
built by an earlier version of dmd which mangled that differently.


More information about the Digitalmars-d mailing list