Linking Trouble (Linux)

Craig Dillabaugh cdillaba at cg.scs.carleton.ca
Thu Sep 12 13:26:28 PDT 2013


On Thursday, 12 September 2013 at 19:46:21 UTC, Craig Dillabaugh
wrote:
> I just upgraded my Linux distro (openSuse) and now when trying 
> to
> compile a project with dub I am getting linking errors.
>
> Compilation goes OK until the linking stage, when I get the
> following:
>
> Linking...
> dmd -of/home/craig/cloud/vibe-tiles/vibe
> /home/craig/cloud/vibe-tiles/temp.o -L-levent_pthreads -L-levent
> -L-lssl -L-lcrypto -g

clip
>
> Strangely, libdl.so.2 and libz.so.1 are both there and libcrypto
> is linked to them.
>
clip
>
> Craig

OK, so I solved my compilation problem by passing the following
as the linker command (added -L-ldl and -L-lz):

dmd -of/home/craig/cloud/vibe-tiles/vibe
/home/craig/cloud/vibe-tiles/temp.o -L-levent_pthreads -L-levent
-L-lssl -L-ldl -L-lz -L-lcrypto -g

How the GCC linker decides which libraries I need to explicitly
specify is indeed a mystery to me.

Craig


More information about the Digitalmars-d-learn mailing list