thx allot for quick reply
i have modified the library name to ssl but i have the same problem with
the linker
error is
Building file: ../src/certificate.cpp
Invoking: Cross G++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/certificate.d"
-MT"src/certificate.d" -o "src/certificate.o" "../src/certificate.cpp"
Finished building: ../src/certificate.cpp
Building file: ../src/client.cc
Invoking: Cross G++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/client.d"
-MT"src/client.d" -o "src/client.o" "../src/client.cc"
Finished building: ../src/client.cc
Building target: certificate
Invoking: Cross G++ Linker
g++ -L/usr/include/openssl -o "certificate" ./src/certificate.o
./src/client.o ./src/server.o -lssl
./src/client.o: In function `Client::Client()':
/home/amirale32/workspace/certificate/Debug/../src/client.cc:12: undefined
reference to `X509_REQ_new'
/home/amirale32/workspace/certificate/Debug/../src/client.cc:13: undefined
reference to `X509_new'
/home/amirale32/workspace/certificate/Debug/../src/client.cc:14: undefined
reference to `X509_NAME_new'
/home/amirale32/workspace/certificate/Debug/../src/client.cc:15: undefined
reference to `RSA_new'
/home/amirale32/workspace/certificate/Debug/../src/client.cc:16: undefined
reference to `EVP_PKEY_new'
./src/client.o: In function `Client::~Client()':
/home/amirale32/workspace/certificate/Debug/../src/client.cc:24: undefined
reference to `X509_REQ_free'
/home/amirale32/workspace/certificate/Debug/../src/client.cc:25: undefined
reference to `X509_free'
/home/amirale32/workspace/certificate/Debug/../src/client.cc:26: undefined
reference to `X509_NAME_free'
/home/amirale32/workspace/certificate/Debug/../src/client.cc:27: undefined
reference to `RSA_free'
/home/amirale32/workspace/certificate/Debug/../src/client.cc:28: undefined
reference to `EVP_PKEY_free'
./src/client.o: In function `Client::GenerateRSAKeyPair()':
/home/amirale32/workspace/certificate/Debug/../src/client.cc:34: undefined
reference to `RSA_generate_key'
./src/client.o: In function `Client::SetPublicKey()':
/home/amirale32/workspace/certificate/Debug/../src/client.cc:40: undefined
reference to `EVP_PKEY_assign'
./src/client.o: In function `Client::MakeSignedCertReq(int, int, int)':
/home/amirale32/workspace/certificate/Debug/../src/client.cc:46: undefined
reference to `X509_REQ_set_pubkey'
/home/amirale32/workspace/certificate/Debug/../src/client.cc:50: undefined
reference to `EVP_md5'
/home/amirale32/workspace/certificate/Debug/../src/client.cc:50: undefined
reference to `X509_REQ_sign'
./src/server.o: In function `Server::Server()':
/home/amirale32/workspace/certificate/Debug/../src/server.cc:5: undefined
reference to `X509_new'
/home/amirale32/workspace/certificate/Debug/../src/server.cc:6: undefined
reference to `RSA_new'
/home/amirale32/workspace/certificate/Debug/../src/server.cc:7: undefined
reference to `EVP_PKEY_new'
./src/server.o: In function `Server::~Server()':
/home/amirale32/workspace/certificate/Debug/../src/server.cc:15: undefined
reference to `X509_free'
/home/amirale32/workspace/certificate/Debug/../src/server.cc:16: undefined
reference to `RSA_free'
/home/amirale32/workspace/certificate/Debug/../src/server.cc:17: undefined
reference to `EVP_PKEY_free'
./src/server.o: In function `Server::CreateCertificate(X509_req_st*)':
/home/amirale32/workspace/certificate/Debug/../src/server.cc:24: undefined
reference to `X509_new'
/home/amirale32/workspace/certificate/Debug/../src/server.cc:27: undefined
reference to `X509_get_subject_name'
/home/amirale32/workspace/certificate/Debug/../src/server.cc:28: undefined
reference to `X509_set_issuer_name'
/home/amirale32/workspace/certificate/Debug/../src/server.cc:30: undefined
reference to `X509_set_subject_name'
/home/amirale32/workspace/certificate/Debug/../src/server.cc:31: undefined
reference to `X509_REQ_get_pubkey'
/home/amirale32/workspace/certificate/Debug/../src/server.cc:33: undefined
reference to `X509_gmtime_adj'
/home/amirale32/workspace/certificate/Debug/../src/server.cc:34: undefined
reference to `X509_gmtime_adj'
/home/amirale32/workspace/certificate/Debug/../src/server.cc:35: undefined
reference to `EVP_md5'
/home/amirale32/workspace/certificate/Debug/../src/server.cc:35: undefined
reference to `X509_sign'
./src/server.o: In function `Server::CreateMyCertificate()':
/home/amirale32/workspace/certificate/Debug/../src/server.cc:42: undefined
reference to `EVP_PKEY_assign'
/home/amirale32/workspace/certificate/Debug/../src/server.cc:43: undefined
reference to `X509_get_serialNumber'
/home/amirale32/workspace/certificate/Debug/../src/server.cc:43: undefined
reference to `ASN1_INTEGER_set'
/home/amirale32/workspace/certificate/Debug/../src/server.cc:44: undefined
reference to `X509_gmtime_adj'
/home/amirale32/workspace/certificate/Debug/../src/server.cc:45: undefined
reference to `X509_gmtime_adj'
/home/amirale32/workspace/certificate/Debug/../src/server.cc:46: undefined
reference to `X509_set_pubkey'
/home/amirale32/workspace/certificate/Debug/../src/server.cc:48: undefined
reference to `X509_get_subject_name'
/home/amirale32/workspace/certificate/Debug/../src/server.cc:49: undefined
reference to `X509_set_issuer_name'
/home/amirale32/workspace/certificate/Debug/../src/server.cc:50: undefined
reference to `EVP_md5'
/home/amirale32/workspace/certificate/Debug/../src/server.cc:50: undefined
reference to `X509_sign'
./src/server.o: In function `Server::GenerateMyKeyPairs()':
/home/amirale32/workspace/certificate/Debug/../src/server.cc:56: undefined
reference to `RSA_generate_key'
./src/server.o: In function `Server::SetPublicKey()':
/home/amirale32/workspace/certificate/Debug/../src/server.cc:62: undefined
reference to `EVP_PKEY_assign'
collect2: error: ld returned 1 exit status
make: *** [certificate] Error 1
Note
i have followed the steps for that links
http://amgadmadkour.blogspot.com/2011/09/compiling-open-ssl-programs-in-eclipse.html
http://askubuntu.com/questions/211038/cant-find-openssl
http://stackoverflow.com/questions/7860657/undefined-reference-to-eclipse-c
but i failed please hellllllllllllllllllpppppppppppppp
Post by Scott NeugroschlItâs -lssl, not -lopenssl.
*Sent:* Thursday, September 18, 2014 1:33 PM
*Subject:* compilation error
/usr/bin/ld: cannot find -lopenssl
this is the error when i have tried to compile the code i attached below i
install the openssl lib in ubuntu 12.10 i use eclipse and add at the linker
setting openssl usr/include/openssl
i don't know how to solve this problem please help
--
Warmest regards and best wishes for a good health,*urs sincerely *
*mero*
--
Warmest regards and best wishes for a good health,*urs sincerely *
*mero*