I have faced with openssl surprises. I have installed openssl libs on my windows XP and tried to compile simple example on C++:
#include <openssl\rsa.h>
#include <stdio.h>
int main(int argc, char** argv)
{
RSA* rsa;
unsigned char* input_string;
unsigned char* encrypt_string;
unsigned char* decrypt_string;
if ( RSA_generate_key_ex( rsa, 1024, NULL, NULL) ) {
printf( " I'm using RSA lib!\n" ) ;
} ;
return 0;
}
Also i configured path to “include” folder, but…
C:\Programming\C++_Projects\main.o:main.cpp|| undefined reference to `RSA_generate_key_ex'|
||=== Build finished: 1 errors, 0 warnings ===|
I’m using Codeblocks and google couldn’t help me. I’m sad so much. Could you help me?)
You have to tell the compiler to link with the openssl library.
In CodeBlocks, you certainly have a tab Libraries (or something equivalent) in your project settings where you can add the openssl library.