Hi, I wrote a program in VC++ 6 to read a X509 certificates from a file but I when I was linking it I received a lot of "Unresolved External <func> in <module>. I tried to find the file in which each of unresolved functions was declared and added them to my project but again I received another errors for another functions. This is too time consuming and boring. Does anybody know a solution for this problem? Thanks in advance, Here is my source code and error listing.
#include "stdafx.h" #include "crypto\x509\x509.h" #include "crypto\pem\pem.h" #include "crypto\bio\bio.h" #include "crypto\crypto.h" int main(int argc, char* argv[]) { BIO *hbio; X509 *mycert; hbio = BIO_new_file"d:/crypto/cert.pem", "r"); mycert = PEM_read_bio_X509(hbio, NULL, NULL, NULL); if (mycert){ printf("ok\n"); // do something with this certificate X509_free(mycert); mycert = NULL; } else{ printf("failed\n"); } if (hbio) BIO_free(hbio); return 0; } Error listing: Linking... bio_lib.obj : error LNK2001: unresolved external symbol _ERR_put_error bss_file.obj : error LNK2001: unresolved external symbol _ERR_put_error pem_oth.obj : error LNK2001: unresolved external symbol _ERR_put_error bio_lib.obj : error LNK2001: unresolved external symbol _CRYPTO_free_ex_data bio_lib.obj : error LNK2001: unresolved external symbol _CRYPTO_new_ex_data bio_lib.obj : error LNK2001: unresolved external symbol _CRYPTO_add_lock bio_lib.obj : error LNK2001: unresolved external symbol _CRYPTO_dup_ex_data bio_lib.obj : error LNK2001: unresolved external symbol _CRYPTO_get_ex_new_index bio_lib.obj : error LNK2001: unresolved external symbol _CRYPTO_set_ex_data bio_lib.obj : error LNK2001: unresolved external symbol _CRYPTO_get_ex_data bss_file.obj : error LNK2001: unresolved external symbol _ERR_add_error_data bss_file.obj : error LNK2001: unresolved external symbol _BUF_strlcpy myapp1.obj : error LNK2001: unresolved external symbol _PEM_read_bio_X509 pem_oth.obj : error LNK2001: unresolved external symbol _PEM_bytes_read_bio mem.obj : error LNK2001: unresolved external symbol _cleanse_ctr mem.obj : error LNK2001: unresolved external symbol _cleanse_ctr mem.obj : error LNK2001: unresolved external symbol _OPENSSL_cleanse Debug/myapp1.exe : fatal error LNK1120: 14 unresolved externals Error executing link.exe. myapp1.exe - 18 error(s), 0 warning(s) __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]