I'm tryng to compile a program that links openssl library. When I compile dynamically I get no problems. The problems come up when I add -static flag, i get this error :
gcc -g -static -static-libgcc -static-libstdc++ -o hmac-sha1-bios-x64 ../main.c -lcrypto -lm /usr/bin/ld: impossibile trovare -lcrypto collect2: error: ld returned 1 exit status Makefile:10: set di istruzioni per l'obiettivo "hmac-sha1-bios-x64" non riuscito make: *** [hmac-sha1-bios-x64] Errore 1 Has anyone any ideas how to compile statically openssl libraries ?
I looked for some references to libcrypto.a in /usr/lib, but I got only libcrypt.a. I'm working on an archlinux, is it possible the official openssl archlinux package doesn't include the needed files to compiple statically ?
libcrypto?