Poco and openssl linker error with visual studio 2010 c++ project

时间:2023-01-15 13:10:20

Trying to link with the static library of Poco throws the following error

尝试链接Poco的静态库会引发以下错误

1>PocoNetSSLmd.lib(SSLManager.obj) : error LNK2001: unresolved external symbol X509_verify_cert_error_string
1>PocoNetSSLmd.lib(Utility.obj) : error LNK2001: unresolved external symbol X509_verify_cert_error_string

But the libeay32.lib static library to which the project is linked contains the symbols

但是项目链接到的libeay32.lib静态库包含符号

$ dumpbin /ALL libeay32.lib | grep X509_STORE_CTX_get_error
    915B6 _X509_STORE_CTX_get_error
    915B6 __imp__X509_STORE_CTX_get_error
    9162E _X509_STORE_CTX_get_error_depth
    9162E __imp__X509_STORE_CTX_get_error_depth
      92C _X509_STORE_CTX_get_error
      92D _X509_STORE_CTX_get_error_depth
      92C __imp__X509_STORE_CTX_get_error
      92D __imp__X509_STORE_CTX_get_error_depth
  Symbol name  : _X509_STORE_CTX_get_error
  Symbol name  : _X509_STORE_CTX_get_error_depth
          1016    _X509_STORE_CTX_get_error
          1017    _X509_STORE_CTX_get_error_depth

The preprocessor symbols POCO_STATIC, POCO_NO_UNWINDOWS, POCO_HAVE_IPv6 are set in the project settings.

预处理器符号POCO_STATIC,POCO_NO_UNWINDOWS,POCO_HAVE_IPv6在项目设置中设置。

How to resolve the issue.

如何解决问题。

1 个解决方案

#1


1  

In your Project Properties, on the Linker page, add the path to your POCO libraries to the "Additional Library Entries" page. Also, on Properties > General > Use of MFC, select "Use MFC in a Static Library"

在“项目属性”的“链接器”页面上,将POCO库的路径添加到“其他库条目”页面。此外,在属性>常规>使用MFC上,选择“在静态库中使用MFC”

Depending on which POCO libs you are using, you will probably have to add paths for Poco/Foundation and at least one other POCO lib.

根据您使用的POCO库,您可能需要为Poco / Foundation和至少一个其他POCO库添加路径。

#1


1  

In your Project Properties, on the Linker page, add the path to your POCO libraries to the "Additional Library Entries" page. Also, on Properties > General > Use of MFC, select "Use MFC in a Static Library"

在“项目属性”的“链接器”页面上,将POCO库的路径添加到“其他库条目”页面。此外,在属性>常规>使用MFC上,选择“在静态库中使用MFC”

Depending on which POCO libs you are using, you will probably have to add paths for Poco/Foundation and at least one other POCO lib.

根据您使用的POCO库,您可能需要为Poco / Foundation和至少一个其他POCO库添加路径。