Home > Back-end >  Ubuntu g <openssl/blowfish. H> compile error undefined BF_set_key
Ubuntu g <openssl/blowfish. H> compile error undefined BF_set_key

Time:09-15

/usr/bin/ld:/TMP/ccs04b2O. O: function in ` decrypt_replay (STD: : vector & , unsigned char const *) ':
The decrypt. CPP: (. Text + 0 x66) : undefined reference to ` BF_set_key '
The/usr/bin/ld: decrypt. CPP: (. Text + 0 x16c) : undefined reference to ` BF_ecb_encrypt '
Collect2: error: ld returned 1 exit status

Using sudo apt - get the install libssl - dev for installation, use the g + + -o a.out - LSSL decrypt. CPP compile, still an error.

Consult everybody bosses what reason is this?

CodePudding user response:

Plus - lcrypto

CodePudding user response:

The
reference 1/f, Simple, Soft reply:
plus - lcrypto


An error into the now... Because the library yet? Or lack of what... ?
$g + + - o a.out - lcrypto - LSSL trials. CPP
The/usr/bin/ld:/TMP/cceNqRh5. O: function in ` decrypt () ':
Trials. CPP: (. Text + 0 x1b8) : undefined reference to ` EVP_CIPHER_CTX_new '
The/usr/bin/ld: trial. CPP: (. Text + 0 x1c8) : undefined reference to ` EVP_CIPHER_CTX_reset '
The/usr/bin/ld: trial. CPP: (. Text + 0 x1cd) : undefined reference to ` EVP_bf_ecb '
The/usr/bin/ld: trial. CPP: (. Text + 0 x1ee) : undefined reference to ` EVP_DecryptInit_ex '
The/usr/bin/ld: trial. CPP: (. Text + 0 x221) : undefined reference to ` EVP_DecryptUpdate '
The/usr/bin/ld: trial. CPP: (. Text + 0 x276) : undefined reference to ` EVP_DecryptFinal '
The/usr/bin/ld: trial. CPP: (. Text + 0 x2b3) : undefined reference to ` EVP_CIPHER_CTX_reset '
Collect2: error: ld returned 1 exit status

CodePudding user response:

Don't wrong order...
- LSSL - lcrypto
Or use - Wl - start - group - Wl, all - end - group. O. a. so put in a group to...

  • Related