Describe the bug
While trying to link the lib with my project,it happens that
[100%] Linking CXX executable pir
/home/ydcy/libscapi/libscapi.a(Prg.o): In function `OpenSSLRC4::setKey(SecretKey&)':
/home/ydcy/libscapi/src/primitives/Prg.cpp:382: undefined reference to `RC4_set_key'
/home/ydcy/libscapi/libscapi.a(Prg.o): In function `PrgFromOpenSSLAES::generateKey(int)':
/home/ydcy/libscapi/src/primitives/Prg.cpp:255: undefined reference to `RAND_bytes'
/home/ydcy/libscapi/libscapi.a(Prg.o): In function `OpenSSLRC4::getPRGBytes(std::vector<unsigned char, std::allocator<unsigned char> >&, int, int)':
/home/ydcy/libscapi/src/primitives/Prg.cpp:421: undefined reference to `RC4'
/home/ydcy/libscapi/libscapi.a(Prg.o): In function `OpenSSLRC4::generateKey(int)':
/home/ydcy/libscapi/src/primitives/Prg.cpp:402: undefined reference to `RAND_bytes'
/home/ydcy/libscapi/libscapi.a(Prg.o): In function `PrgFromOpenSSLAES::prepare()':
/home/ydcy/libscapi/src/primitives/Prg.cpp:372: undefined reference to `EVP_EncryptUpdate'
/home/ydcy/libscapi/libscapi.a(Prg.o): In function `PrgFromOpenSSLAES::setKey(SecretKey&)':
/home/ydcy/libscapi/src/primitives/Prg.cpp:272: undefined reference to `EVP_CIPHER_CTX_new'
/home/ydcy/libscapi/src/primitives/Prg.cpp:276: undefined reference to `EVP_CIPHER_CTX_reset'
/home/ydcy/libscapi/src/primitives/Prg.cpp:277: undefined reference to `EVP_aes_128_ecb'
/home/ydcy/libscapi/src/primitives/Prg.cpp:277: undefined reference to `EVP_EncryptInit'
/home/ydcy/libscapi/src/primitives/Prg.cpp:282: undefined reference to `EVP_EncryptUpdate'
/home/ydcy/libscapi/src/primitives/Prg.cpp:289: undefined reference to `EVP_CIPHER_CTX_reset'
/home/ydcy/libscapi/src/primitives/Prg.cpp:290: undefined reference to `EVP_CIPHER_CTX_reset'
/home/ydcy/libscapi/src/primitives/Prg.cpp:291: undefined reference to `EVP_aes_128_ecb'
/home/ydcy/libscapi/src/primitives/Prg.cpp:291: undefined reference to `EVP_EncryptInit'
/home/ydcy/libscapi/libscapi.a(Prg.o): In function `PrgFromOpenSSLAES::~PrgFromOpenSSLAES()':
/home/ydcy/libscapi/src/primitives/Prg.cpp:244: undefined reference to `EVP_CIPHER_CTX_reset'
collect2: error: ld returned 1 exit status
CMakeFiles/pir.dir/build.make:96: recipe for target 'pir' failed
make[2]: *** [pir] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/pir.dir/all' failed
make[1]: *** [CMakeFiles/pir.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Steps to reproduce the bug
The CmakeLists.txt is as below
Describe the bug While trying to link the lib with my project,it happens that
Steps to reproduce the bug The CmakeLists.txt is as below
and the c++ code is
Machine details (please complete the following information):