Libcurl windows构建VS2015 OpenSSL HTTP2

时间:2017-05-15 15:46:18

标签: c++ curl openssl libcurl nghttp2

我目前正在尝试使用Visual Studio 2015在Windows 10上使用OpenSSL和HTTP2构建Libcurl 7.54.0,并且我在编译结束时在构建日志中收到这些错误:

1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_callbacks_new referenced in function _Curl_http2_init
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_callbacks_del referenced in function _Curl_http2_init
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_callbacks_set_send_callback referenced in function _Curl_http2_init
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_callbacks_set_on_frame_recv_callback referenced in function _Curl_http2_init
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_callbacks_set_on_invalid_frame_recv_callback referenced in function _Curl_http2_init
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_callbacks_set_on_data_chunk_recv_callback referenced in function _Curl_http2_init
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_callbacks_set_before_frame_send_callback referenced in function _Curl_http2_init
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_callbacks_set_on_frame_send_callback referenced in function _Curl_http2_init
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_callbacks_set_on_frame_not_send_callback referenced in function _Curl_http2_init
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_callbacks_set_on_stream_close_callback referenced in function _Curl_http2_init
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_callbacks_set_on_begin_headers_callback referenced in function _Curl_http2_init
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_callbacks_set_on_header_callback referenced in function _Curl_http2_init
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_callbacks_set_error_callback referenced in function _Curl_http2_init
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_client_new referenced in function _Curl_http2_init
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_del referenced in function _http2_disconnect
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_send referenced in function _h2_session_send
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_mem_recv referenced in function _Curl_http2_switched
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_resume_data referenced in function _Curl_http2_done_sending
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_want_read referenced in function _should_close_session
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_want_write referenced in function _http2_perform_getsock
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_get_stream_user_data referenced in function _before_frame_send
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_set_stream_user_data referenced in function _Curl_http2_done
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_get_remote_settings referenced in function _on_frame_recv
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_upgrade referenced in function _Curl_http2_switched
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_pack_settings_payload referenced in function _Curl_http2_request_upgrade
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_strerror referenced in function _Curl_http2_switched
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_http2_strerror referenced in function _Curl_http2_strerror
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_priority_spec_init referenced in function _h2_pri_spec
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_submit_request referenced in function _http2_send
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_submit_priority referenced in function _h2_session_send
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_submit_rst_stream referenced in function _Curl_http2_done
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_submit_settings referenced in function _Curl_http2_switched
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_set_local_window_size referenced in function _Curl_http2_switched
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_version referenced in function _Curl_http2_ver
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_is_fatal referenced in function _Curl_http2_switched
1>..\..\..\..\build\Win32\VC14\LIB Release - DLL OpenSSL\curl.exe : fatal error LNK1120: 35 unresolved externals

根据OpenSSL&在我的电脑上的nghttp2路径,我已经添加了以下内容来卷曲& libcurl项目: 我已将以下文件夹添加到我的附加库目录(curl project-> properties-> configuration properties-> linker-> general-> additionalnal library directories):

C:\OpenSSL-Win32\lib
C:\nghttp2-1.22.0\lib

并且为curl和libcurl项目添加了另外包括目录(两个项目 - > properties->配置属性 - > c / c ++ - > general-> additionnal include目录):

C:\OpenSSL-Win32\include
C:\nghttp2-1.22.0\lib\includes

我还将USE_NGHTTP2的定义添加到项目预处理器定义(两个项目 - >属性 - >配置属性 - > C / C ++ - >预处理器 - >预处理器定义)中,以便使用nghttp2进行编译。

最后,我正在使用目标平台Win32配置“LIB Release - DLL OpenSSL”构建。

编辑:这个问题似乎与nghttp2有关,因为我在没有NGHTTP2预处理器定义的情况下成功构建。

我肯定错过了一些东西,但目前看不到什么。

感谢您的帮助

卢卡斯

0 个答案:

没有答案