https://issues.dlang.org/show_bug.cgi?id=15531
Heromyth <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #2 from Heromyth <[email protected]> --- Running this command on Linux: dmd -g -ofunittest/debug/thrift/server/transport/ssl -unittest -w -wi -I../../lib/d/src src/thrift/server/transport/ssl.d libthriftd-event.a libthriftd-ssl.a libthriftd.a -L-L/usr/bin/dmd -L-levent -L-lcrypto -L-lssl unittest/emptymain.d Would get some error messages like: libthriftd-ssl.a(ssl_2a8_3af.o): In function `_D6thrift9transport3ssl10TSSLSocket6isOpenMFNdZb': src/thrift/transport/ssl.d:(.text._D6thrift9transport3ssl10TSSLSocket6isOpenMFNdZb+0x69): undefined reference to `SSL_get_shutdown' The underlying command line is: cc unittest/debug/thrift/server/transport/ssl.o -o unittest/debug/thrift/server/transport/ssl -g -m64 **-levent -lcrypto -lssl** -L/usr/lib/x86_64-linux-gnu -Xlinker --export-dynamic libthriftd-event.a libthriftd-ssl.a libthriftd.a -Xlinker -Bstatic -lphobos2 -Xlinker -Bdynamic -lpthread -lm -lrt -ldl The correct command line should be: cc unittest/debug/thrift/server/transport/ssl.o -o unittest/debug/thrift/server/transport/ssl -g -m64 -L/usr/lib/x86_64-linux-gnu -Xlinker --export-dynamic libthriftd-event.a libthriftd-ssl.a libthriftd.a **-levent -lcrypto -lssl** -Xlinker -Bstatic -lphobos2 -Xlinker -Bdynamic -lpthread -lm -lrt -ldl The difference is that -levent -lcrypto -lssl is behind *.a. The order of custom linker flags seem wrong. --
