I am attempting to build libcurl using a static version of NGHTTP2 on Windows 11. I keep getting an unsolved symbol error that does not make sense to me.
b(nghttp2_session.obj)' in function 'session_call_error_callback'
LINK : warning LNK4217: symbol 'malloc' defined in 'libucrt.lib(malloc.obj)' is imported by 'nghttp2.lib(nghttp2_mem.obj)' in function 'default_malloc'
LINK : warning LNK4217: symbol 'realloc' defined in 'libucrt.lib(realloc.obj)' is imported by 'nghttp2.lib(nghttp2_mem.obj)' in function 'default_realloc'
LINK : warning LNK4217: symbol '__acrt_iob_func' defined in 'libucrt.lib(_file.obj)' is imported by 'nghttp2.lib(nghttp2_map.obj)' in function 'nghttp2_map_print_distance'
LINK : warning LNK4217: symbol '__stdio_common_vfprintf' defined in 'libucrt.lib(output.obj)' is imported by 'nghttp2.lib(nghttp2_map.obj)' in function 'fprintf'
LINK : warning LNK4217: symbol 'qsort' defined in 'libucrt.lib(qsort.obj)' is imported by 'nghttp2.lib(nghttp2_frame.obj)' in function 'nghttp2_nv_array_sort'
nghttp2.lib(nghttp2_stream.obj) : error LNK2001: unresolved external symbol __imp__wassert
nghttp2.lib(nghttp2_http.obj) : error LNK2001: unresolved external symbol __imp__wassert
nghttp2.lib(nghttp2_rcbuf.obj) : error LNK2001: unresolved external symbol __imp__wassert
nghttp2.lib(sfparse.obj) : error LNK2001: unresolved external symbol __imp__wassert
nghttp2.lib(nghttp2_map.obj) : error LNK2001: unresolved external symbol __imp__wassert
nghttp2.lib(nghttp2_frame.obj) : error LNK2001: unresolved external symbol __imp__wassert
nghttp2.lib(nghttp2_outbound_item.obj) : error LNK2001: unresolved external symbol __imp__wassert
nghttp2.lib(nghttp2_pq.obj) : error LNK2001: unresolved external symbol __imp__wassert
nghttp2.lib(nghttp2_session.obj) : error LNK2001: unresolved external symbol __imp__wassert
nghttp2.lib(nghttp2_submit.obj) : error LNK2001: unresolved external symbol __imp__wassert
nghttp2.lib(nghttp2_helper.obj) : error LNK2001: unresolved external symbol __imp__wassert
nghttp2.lib(nghttp2_hd.obj) : error LNK2001: unresolved external symbol __imp__wassert
I am doing this to build NGHTTP2:
cmake -DENABLE_STATIC_LIB=YES -DENABLE_SHARED_LIB=no -DENABLE_DEBUG=no
cmake --build . --config --target INSTALL
This is ran with admin privileges in x64 build tools for VS. This places a directory in my program files with an include/share/lib folder. the lib folder only contains the .lib file since i disabled shared. Then I am placing the nghttp2.lib file and the nghttp2 folder (with the header files) inside my winbuild folder.
Looks like above.
Then I CD into the winbuild folder and run this:
nmake /f Makefile.vc mode=static vc=17 debug=no WITH_NGHTTP2=static
After this, I get the errors I have shown above. To my knowledge, imp is some sort of DLL related stuff, but I am trying to not use any sort of DLL, so I am not sure why it is doing that. How can I make my curl compile?