Request assistance resolving linker error: Undefined symbol(s) for architecture x86_64

H. S. Teoh hsteoh at qfbox.info
Wed Aug 3 05:04:08 UTC 2022


On Wed, Aug 03, 2022 at 04:28:57AM +0000, anonymouse via Digitalmars-d-learn wrote:
> How do I go about tracking down what's causing the following error:
> 
> ```
> Undefined symbols for architecture x86_64:
>   "__D3std8internal6memory12__ModuleInfoZ", referenced from:
>       __D3loxQe12__ModuleInfoZ in dlux.o
> ld: symbol(s) not found for architecture x86_64
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
> ```
> 
> I'm not explicitly calling anything in std.internal.memory so not sure
> how to resolve. Thanks.
[...]

This is often a sign of version mismatch between libraries and compiler.
Did you recently upgrade your compiler?  Did you accidentally install
two versions of the standard library and the new compiler is mistakenly
picking up the old library?

Maybe try also recompiling your project from clean slate just in case
your build process is picking up stale binaries for whatever reason. If
you have object files compiled with the old version of the compiler
still lying around, and they get picked up when compiling with the new
compiler, it would cause link errors like the above.


T

-- 
Winners never quit, quitters never win. But those who never quit AND never win are idiots.


More information about the Digitalmars-d-learn mailing list