curl / Mailing Lists / curl-library / Single Mail

curl-library

Libcurl windows build VS2015 OpenSSL HTTP2

From: Lucas Le Gouic <lucas_at_wolcengame.com>
Date: Mon, 15 May 2017 17:25:58 +0200

Hello everyone,

I am currently trying to build Libcurl 7.54.0 with OpenSSL and HTTP2 on
windows 10 using Visual Studio 2015 and I am getting these errors in the
build log at the end of generation:

----------------------------------------------------------------------------------------
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
----------------------------------------------------------------------------------------

According to OpenSSL & nghttp2 path on my computer, I have added the
following to curl & libcurl project:
I have added the following folders to my additionnal library directories
(curl project->properties->configuration
properties->linker->general->additionnal library directories) :
C:\OpenSSL-Win32\lib
C:\nghttp2-1.22.0\lib

And added for both curl and libcurl project additionnal include
directories (both projects->properties->configuration
properties->c/c++->general->additionnal include directories) :
C:\OpenSSL-Win32\include
C:\nghttp2-1.22.0\lib\includes

I also added the definition of USE_NGHTTP2 to both project preprocessor
definitions (both projects->properties->configuration
properties->C/C++->Preprocessor->Preprocessor Definitions) in order to
compile with nghttp2.

Finally, I am building using configuration "LIB Release - DLL OpenSSL"
with target platform Win32.

I am surely missing something but I can't see what at the moment.

Thank you for your assistance

Lucas

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-05-15