Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
gcc、Ubuntu。
行ったこと:
sudo apt-get install libssl-dev
-lsslを使用してビルドしますが、リンク中にエラーが発生します。
`DES_set_odd_parity'への未定義の参照
?
編集済み:g ++ linear_des.cpp -lssl
DES_set_odd_parityの一部なlibcryptoので、それもリンクしてみてください。これらの行の何か: g++ linear_des.cpp -lssl -lcrypto これが役立つことを願っています! PS:pkg-configツールを利用して、次の行で何かをコンパイルすることをお勧めします。 g++ linear_des.cpp $(pkg-config --cflags --libs openssl)
DES_set_odd_parity
libcrypto
g++ linear_des.cpp -lssl -lcrypto
pkg-config
g++ linear_des.cpp $(pkg-config --cflags --libs openssl)