Wie man C++ undefined reference to symbol 'BIO_ctrl_pending@@OPENSSL_3.0.0' behebt
Problem:
Beim Versuch, Ihr C++-Programm, das OpenSSL verwendet, mit einem Befehl wie
build_cmd.sh
g++ -o myprogram myprogram.cpp -lsslzu kompilieren, sehen Sie die folgende Fehlermeldung:
linker_error.txt
/usr/bin/ld: /tmp/ccEB0Pid.o: undefined reference to symbol 'BIO_ctrl_pending@@OPENSSL_3.0.0'
/usr/bin/ld: /lib/x86_64-linux-gnu/libcrypto.so.3: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit statusLösung
Sie müssen crypto sowie ssl linken:
fix_build.sh
g++ -o myprogram myprogram.cpp -lcrypto -lsslCheck out similar posts by category:
GCC Errors
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow