2
votes

gcc, Ubuntu.

Have done:

sudo apt-get install libssl-dev

Build with -lssl, but during linkage get error:

undefined reference to `DES_set_odd_parity'

?

EDITED: g++ linear_des.cpp -lssl

1
What is exact command used for compilation? Are your libraries being linked in the end? - another.anon.coward
can you post the full command used to do the compilation? - Attila

1 Answers

6
votes

DES_set_odd_parity is part of libcrypto so you should try linking that as well. Something on these lines:
g++ linear_des.cpp -lssl -lcrypto
Hope this helps!
PS: It might be a good idea to make use of pkg-config tool & compile something on these lines:
g++ linear_des.cpp $(pkg-config --cflags --libs openssl)