Linker error under Ubuntu

kinke noone at nowhere.com
Sat May 16 03:00:15 UTC 2020


On Thursday, 14 May 2020 at 16:09:16 UTC, solidstate1991 wrote:
> When I try to compile my own project under Ubuntu with dub, I 
> get the following linker error:
>
> /usr/bin/ld: .dub/obj/pixelperfectengine_pixelperfecteditor.o: 
> undefined reference to symbol 'inflateEnd'
> //lib/x86_64-linux-gnu/libz.so.1: error adding symbols: DSO 
> missing from command line
> collect2: error: ld returned 1 exit status
> Error: /usr/bin/gcc failed with status: 1
> /usr/bin/ldc2 failed with exit code 1.

This sounds like a misconfigured distro-LDC. zlib is usually 
integrated into libphobos, but distros tend to favor the distro's 
libz.so and patch it out. That must be handled in /etc/ldc2.conf 
though, with something like 
`-defaultlib=phobos2-ldc,z,druntime-ldc` (and possibly a 
zlib1g-dev package dependency).


More information about the Digitalmars-d-learn mailing list