ldc link error on new machine: undefined reference to `_D6object9Throwable7messageMxFNbNfZAxa'

mw mingwu at gmail.com
Thu Jun 15 01:32:58 UTC 2023


On Thursday, 15 June 2023 at 01:20:50 UTC, H. S. Teoh wrote:
> On Thu, Jun 15, 2023 at 12:49:30AM +0000, mw via 
> Digitalmars-d-learn wrote:
>> Hi,
>> 
> Recently encountered a similar problem, ultimately the cause 
> was that my library paths turned out to be wrongly set, so it 
> was picking up the wrong version of the precompiled libraries.  
> Probably you could check whether the library paths in ldc2.conf 
> are set correctly, and also double-check whether the libraries 
> at those paths are actually the correct ones for your compiler 
> version (you may have installed the wrong libraries in the 
> right paths).  Mixing up libraries from different LDC releases 
> tend to show up as link errors of this kind.

Thanks for the tip, indeed it was caused by `ld` picking up the 
wrong lib (in a different sys path):

```
$ locate libdruntime-ldc
(... my local LDC install)
/usr/lib/x86_64-linux-gnu/libdruntime-ldc-debug-shared.so
/usr/lib/x86_64-linux-gnu/libdruntime-ldc-debug-shared.so.2.0.98
/usr/lib/x86_64-linux-gnu/libdruntime-ldc-debug-shared.so.98
/usr/lib/x86_64-linux-gnu/libdruntime-ldc-debug.a
/usr/lib/x86_64-linux-gnu/libdruntime-ldc-shared.so
/usr/lib/x86_64-linux-gnu/libdruntime-ldc-shared.so.2.0.98
/usr/lib/x86_64-linux-gnu/libdruntime-ldc-shared.so.98
/usr/lib/x86_64-linux-gnu/libdruntime-ldc.a
```

while I'm using my local installed LDC.  After removing the 
system installation, it worked.




More information about the Digitalmars-d-learn mailing list