Building REST VOL on Windows 10


#1

I have problems building the REST VOL connector using the https://github.com/HDFGroup/vol-rest/tree/hdf5_1_12_update Git branch.

The build_vol_cmake.bat is empty. Only REM lines.

I tried the Manual Build CMake instruction with no success. I tried with:

  • cmake -G “NMake Makefiles” -DCURL_LIBRARY=C:\curl-7.77.0-win64-mingw\lib\libcurl.a -DCURL_INCLUDE_DIR=C:\curl-7.77.0-win64-mingw\include -DYAJL_LIBRARY=C:\YetAnotherJSONParser\lib\yajl.lib -DYAJL_INCLUDE_DIR=C:\YetAnotherJSONParser\include …
  • cmake -G “Unix Makefiles” -DCURL_LIBRARY=C:\curl-7.77.0-win64-mingw\lib\libcurl.a -DCURL_INCLUDE_DIR=C:\curl-7.77.0-win64-mingw\include -DYAJL_LIBRARY=C:\YetAnotherJSONParser\lib\yajl.lib -DYAJL_INCLUDE_DIR=C:\YetAnotherJSONParser\include …
  • cmake -DC* URL_LIBRARY=C:\curl-7.77.0-win64-mingw\lib\libcurl.a -DCURL_INCLUDE_DIR=C:\curl-7.77.0-win64-mingw\include -DYAJL_LIBRARY=C:\YetAnotherJSONParser\lib\yajl.lib -DYAJL_INCLUDE_DIR=C:\YetAnotherJSONParser\include …

The last one seems to complete with some errors. The make command complains that there is no makefile.

F:\Dev\Windows\HDF5_REST_VOL\vol-rest\build>cmake -DCURL_LIBRARY=C:\curl-7.77.0-win64-mingw\lib\libcurl.a -DCURL_INCLUDE_DIR=C:\curl-7.77.0-win64-mingw\include -DYAJL_LIBRARY=C:\YetAnotherJSONParser\lib\yajl.lib -DYAJL_INCLUDE_DIR=C:\YetAnotherJSONParser\include …
– Building for: Visual Studio 16 2019
– The C compiler identification is MSVC 19.29.30037.0
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - skipped
– Detecting C compile features
– Detecting C compile features - done
– Found Git: C:/Program Files/Git/cmd/git.exe (found version “2.32.0.windows.1”)
– Found CURL: C:\curl-7.77.0-win64-mingw\lib\libcurl.a (found version “7.77.0”)
– Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to find_package_handle_standard_args (yajl) does
not match the name of the calling package (YAJL). This can lead to
problems in calling code that expects find_package result variables
(e.g., _FOUND) to follow a certain pattern.
Call Stack (most recent call first):
CMake/FindYAJL.cmake:22 (find_package_handle_standard_args)
CMakeLists.txt:127 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

– Found yajl: C:/YetAnotherJSONParser/lib/yajl.lib
– VERSION: 0.1.0
– SOVERSION: 200.0.0
– SOVERSION_TOOLS: 200.0.0
– SOVERSION_CXX: 200.0.0
– SOVERSION_F: 200.0.0
– SOVERSION_HL: 200.0.0
– SOVERSION_HL_CXX: 200.0.0
– SOVERSION_HL_F: 200.0.0
– SOVERSION_JAVA: 200.0.0
– Looking for include file sys/file.h
– Looking for include file sys/file.h - not found
– Looking for include file sys/ioctl.h
– Looking for include file sys/ioctl.h - not found
– Looking for include file sys/resource.h
– Looking for include file sys/resource.h - not found
– Looking for include file sys/socket.h
– Looking for include file sys/socket.h - not found
– Looking for include file sys/stat.h
– Looking for include file sys/stat.h - found
– Looking for include files sys/stat.h, sys/time.h
– Looking for include files sys/stat.h, sys/time.h - not found
– Looking for include files sys/stat.h, sys/types.h
– Looking for include files sys/stat.h, sys/types.h - found
– Looking for 3 include files sys/stat.h, …, features.h
– Looking for 3 include files sys/stat.h, …, features.h - not found
– Looking for 3 include files sys/stat.h, …, dirent.h
– Looking for 3 include files sys/stat.h, …, dirent.h - not found
– Looking for 3 include files sys/stat.h, …, setjmp.h
– Looking for 3 include files sys/stat.h, …, setjmp.h - found
– Looking for 4 include files sys/stat.h, …, stddef.h
– Looking for 4 include files sys/stat.h, …, stddef.h - found
– Looking for 5 include files sys/stat.h, …, stdint.h
– Looking for 5 include files sys/stat.h, …, stdint.h - found
– Looking for 6 include files sys/stat.h, …, unistd.h
– Looking for 6 include files sys/stat.h, …, unistd.h - not found
– Looking for 6 include files sys/stat.h, …, mach/mach_time.h
– Looking for 6 include files sys/stat.h, …, mach/mach_time.h - not found
– Looking for 6 include files sys/stat.h, …, io.h
– Looking for 6 include files sys/stat.h, …, io.h - found
– Looking for 7 include files sys/stat.h, …, winsock2.h
– Looking for 7 include files sys/stat.h, …, winsock2.h - found
– Looking for 8 include files sys/stat.h, …, sys/timeb.h
– Looking for 8 include files sys/stat.h, …, sys/timeb.h - found
– Looking for 9 include files sys/stat.h, …, globus/common.h
– Looking for 9 include files sys/stat.h, …, globus/common.h - not found
– Looking for 9 include files sys/stat.h, …, pdb.h
– Looking for 9 include files sys/stat.h, …, pdb.h - not found
– Looking for 9 include files sys/stat.h, …, pthread.h
– Looking for 9 include files sys/stat.h, …, pthread.h - not found
– Looking for 9 include files sys/stat.h, …, srbclient.h
– Looking for 9 include files sys/stat.h, …, srbclient.h - not found
– Looking for 9 include files sys/stat.h, …, string.h
– Looking for 9 include files sys/stat.h, …, string.h - found
– Looking for 10 include files sys/stat.h, …, strings.h
– Looking for 10 include files sys/stat.h, …, strings.h - not found
– Looking for 10 include files sys/stat.h, …, stdlib.h
– Looking for 10 include files sys/stat.h, …, stdlib.h - found
– Looking for 11 include files sys/stat.h, …, memory.h
– Looking for 11 include files sys/stat.h, …, memory.h - found
– Looking for 12 include files sys/stat.h, …, dlfcn.h
– Looking for 12 include files sys/stat.h, …, dlfcn.h - not found
– Looking for 12 include files sys/stat.h, …, inttypes.h
– Looking for 12 include files sys/stat.h, …, inttypes.h - found
– Looking for 13 include files sys/stat.h, …, netinet/in.h
– Looking for 13 include files sys/stat.h, …, netinet/in.h - not found
– Looking for 13 include files sys/stat.h, …, stdbool.h
– Looking for 13 include files sys/stat.h, …, stdbool.h - found
– Looking for include file quadmath.h
– Looking for include file quadmath.h - not found
– Looking for gethostname in ucb;
– Looking for gethostname in ucb; - not found
– Performing Other Test STDC_HEADERS - Success
– Looking for sys/types.h
– Looking for sys/types.h - found
– Looking for stdint.h
– Looking for stdint.h - found
– Looking for stddef.h
– Looking for stddef.h - found
– Check size of char
– Check size of char - done
– Check size of short
– Check size of short - done
– Check size of int
– Check size of int - done
– Check size of unsigned
– Check size of unsigned - done
– Check size of long
– Check size of long - done
– Check size of long long
– Check size of long long - done
– Check size of __int64
– Check size of __int64 - done
– Check size of float
– Check size of float - done
– Check size of double
– Check size of double - done
– Check size of long double
– Check size of long double - done
– Check size of int8_t
– Check size of int8_t - done
– Check size of uint8_t
– Check size of uint8_t - done
– Check size of int_least8_t
– Check size of int_least8_t - done
– Check size of uint_least8_t
– Check size of uint_least8_t - done
– Check size of int_fast8_t
– Check size of int_fast8_t - done
– Check size of uint_fast8_t
– Check size of uint_fast8_t - done
– Check size of int16_t
– Check size of int16_t - done
– Check size of uint16_t
– Check size of uint16_t - done
– Check size of int_least16_t
– Check size of int_least16_t - done
– Check size of uint_least16_t
– Check size of uint_least16_t - done
– Check size of int_fast16_t
– Check size of int_fast16_t - done
– Check size of uint_fast16_t
– Check size of uint_fast16_t - done
– Check size of int32_t
– Check size of int32_t - done
– Check size of uint32_t
– Check size of uint32_t - done
– Check size of int_least32_t
– Check size of int_least32_t - done
– Check size of uint_least32_t
– Check size of uint_least32_t - done
– Check size of int_fast32_t
– Check size of int_fast32_t - done
– Check size of uint_fast32_t
– Check size of uint_fast32_t - done
– Check size of int64_t
– Check size of int64_t - done
– Check size of uint64_t
– Check size of uint64_t - done
– Check size of int_least64_t
– Check size of int_least64_t - done
– Check size of uint_least64_t
– Check size of uint_least64_t - done
– Check size of int_fast64_t
– Check size of int_fast64_t - done
– Check size of uint_fast64_t
– Check size of uint_fast64_t - done
– Check size of size_t
– Check size of size_t - done
– Check size of ssize_t
– Check size of ssize_t - failed
– Check size of off_t
– Check size of off_t - done
– Check size of off64_t
– Check size of off64_t - failed
– Check size of time_t
– Check size of time_t - done
– Check size of Bool
– Check size of Bool - done
– Looking for alarm
– Looking for alarm - not found
– Looking for fcntl
– Looking for fcntl - not found
– Looking for flock
– Looking for flock - not found
– Looking for fork
– Looking for fork - not found
– Looking for frexpf
– Looking for frexpf - not found
– Looking for frexpl
– Looking for frexpl - not found
– Looking for getrusage
– Looking for getrusage - not found
– Looking for llround
– Looking for llround - found
– Looking for llroundf
– Looking for llroundf - found
– Looking for lround
– Looking for lround - found
– Looking for lroundf
– Looking for lroundf - found
– Looking for lstat
– Looking for lstat - not found
– Looking for pread
– Looking for pread - not found
– Looking for pwrite
– Looking for pwrite - not found
– Looking for rand_r
– Looking for rand_r - not found
– Looking for random
– Looking for random - not found
– Looking for round
– Looking for round - found
– Looking for roundf
– Looking for roundf - found
– Looking for setsysinfo
– Looking for setsysinfo - not found
– Looking for signal
– Looking for signal - found
– Looking for setjmp
– Looking for setjmp - found
– Looking for siglongjmp
– Looking for siglongjmp - not found
– Looking for sigsetjmp
– Looking for sigsetjmp - not found
– Looking for sigprocmask
– Looking for sigprocmask - not found
– Looking for snprintf
– Looking for snprintf - not found
– Looking for srandom
– Looking for srandom - not found
– Looking for strtoll
– Looking for strtoll - found
– Looking for strtoull
– Looking for strtoull - found
– Looking for symlink
– Looking for symlink - not found
– Looking for tmpfile
– Looking for tmpfile - found
– Looking for asprintf
– Looking for asprintf - not found
– Looking for vasprintf
– Looking for vasprintf - not found
– Looking for waitpid
– Looking for waitpid - not found
– Looking for vsnprintf
– Looking for vsnprintf - not found
– Looking for sigsetjmp
– Looking for sigsetjmp - not found
– Checking for InitOnceExecuteOnce:
– Performing Test InitOnceExecuteOnce - Success
– Performing Other Test HAVE_INLINE - Success
– Performing Other Test HAVE___INLINE
- Failed
– Performing Other Test HAVE___INLINE - Success
– Checking for appropriate format for 64 bit long:
– Checking for appropriate format for 64 bit long: found “I64”
– Looking for difftime
– Looking for difftime - found
– Check size of __float128
– Check size of __float128 - failed
– Check size of _Quad
– Check size of _Quad - failed
– Checking IF your system converts long double to (unsigned) long values with special algorithm… no
– Checking IF your system can convert (unsigned) long to long double values with special algorithm… no
– Checking IF correctly converting long double to (unsigned) long long values… yes
– Checking IF correctly converting (unsigned) long long to long double values… yes
– Checking IF the cpu is power9 and cannot correctly converting long double values… no
– Checking IF alignment restrictions are strictly enforced… yes
– Warnings Configuration: default: /DWIN32 /D_WINDOWS /W3 :
– Found Perl: C:/Strawberry/perl/bin/perl.exe (found version “5.32.1”)
– Generating ‘H5Epubgen.h’
Generating ‘H5Einit.h’
Generating ‘H5Eterm.h’
Generating ‘H5Edefin.h’

– Generating ‘F:/Dev/Windows/HDF5_REST_VOL/vol-rest/src/hdf5/src/H5version.h’

– Generating ‘H5overflow.h’

– Cannot execute TEST flushrefresh - perl not found
– The CXX compiler identification is MSVC 19.29.30037.0
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - skipped
– Detecting CXX compile features
– Detecting CXX compile features - done
– Check for STD namespace
– Check for STD namespace - found
– Looking for C++ include stdint.h
– Looking for C++ include stdint.h - found
– Performing CXX Test OLD_HEADER_FILENAME - Failed
– Performing CXX Test HDF_NO_NAMESPACE - Failed
– Performing CXX Test HDF_NO_STD - Failed
– Performing CXX Test BOOL_NOTDEFINED - Failed
– Performing CXX Test NO_STATIC_CAST - Failed
– Performing CXX Test CXX_HAVE_OFFSETOF - Failed
– Configuring done
– Generating done
– Build files have been written to: F:/Dev/Windows/HDF5_REST_VOL/vol-rest/build

F:\Dev\Windows\HDF5_REST_VOL\vol-rest\build>make
make: *** No targets specified and no makefile found. Stop.

F:\Dev\Windows\HDF5_REST_VOL\vol-rest\build>


#2

Hi @plessard,

Indeed, for now the build process on Windows is a bit more manual since I have not yet fleshed out the .bat file for building. Since it looks like you’re using Visual Studio to build (please correct me if that isn’t the case), you probably want to specify -G "Visual Studio 16 2019" to the cmake command to generate a solution file for Visual Studio to use for building. Once that .sln file has been generated, you should be able to either open the .sln file in Visual Studio and build that way, or build directly using MSBuild <solution_file>.sln. I imagine that you would have no issues building with MinGW or similar, but for now Visual Studio is the main way that I have built and tested the VOL connector on Windows.

I believe that if CMake detects that Visual Studio is installed on the Windows system, it will default to generating .sln files, which would be why you aren’t seeing a makefile being generated in the third case that you tried.


#3

Hi @jhenderson,

I was able to compile the library using -G “Visual Studio 16 2019”. I still have problems with the link phase. I have the following error messages:

17> Creating library F:/Dev/Windows/HDF5_REST_VOL/vol-rest/build/bin/Release/hdf5_vol_rest.lib and object F:/Dev/Windows/HDF5_REST_VOL/vol-rest/build/bin/Release/hdf5_vol_rest.exp
17>rest_vol.obj : error LNK2019: unresolved external symbol __imp_curl_easy_escape referenced in function H5_rest_url_encode_path
17>rest_vol_attr.obj : error LNK2001: unresolved external symbol __imp_curl_easy_escape
17>rest_vol_link.obj : error LNK2001: unresolved external symbol __imp_curl_easy_escape
17>rest_vol.obj : error LNK2019: unresolved external symbol __imp_curl_free referenced in function H5_rest_url_encode_path
17>rest_vol_attr.obj : error LNK2001: unresolved external symbol __imp_curl_free
17>rest_vol_link.obj : error LNK2001: unresolved external symbol __imp_curl_free
17>rest_vol.obj : error LNK2019: unresolved external symbol __imp_curl_global_init referenced in function H5_rest_init
17>rest_vol.obj : error LNK2019: unresolved external symbol __imp_curl_global_cleanup referenced in function H5_rest_term
17>rest_vol_file.obj : error LNK2001: unresolved external symbol __imp_curl_slist_append
17>rest_vol_group.obj : error LNK2001: unresolved external symbol __imp_curl_slist_append
17>rest_vol_link.obj : error LNK2001: unresolved external symbol __imp_curl_slist_append
17>rest_vol_object.obj : error LNK2001: unresolved external symbol __imp_curl_slist_append
17>rest_vol.obj : error LNK2001: unresolved external symbol __imp_curl_slist_append
17>rest_vol_attr.obj : error LNK2001: unresolved external symbol __imp_curl_slist_append
17>rest_vol_dataset.obj : error LNK2001: unresolved external symbol __imp_curl_slist_append
17>rest_vol_datatype.obj : error LNK2001: unresolved external symbol __imp_curl_slist_append
17>rest_vol_file.obj : error LNK2001: unresolved external symbol __imp_curl_slist_free_all
17>rest_vol_group.obj : error LNK2001: unresolved external symbol __imp_curl_slist_free_all
17>rest_vol_link.obj : error LNK2001: unresolved external symbol __imp_curl_slist_free_all
17>rest_vol_object.obj : error LNK2001: unresolved external symbol __imp_curl_slist_free_all
17>rest_vol.obj : error LNK2001: unresolved external symbol __imp_curl_slist_free_all
17>rest_vol_attr.obj : error LNK2001: unresolved external symbol __imp_curl_slist_free_all
17>rest_vol_dataset.obj : error LNK2001: unresolved external symbol __imp_curl_slist_free_all
17>rest_vol_datatype.obj : error LNK2001: unresolved external symbol __imp_curl_slist_free_all
17>rest_vol.obj : error LNK2019: unresolved external symbol __imp_curl_version_info referenced in function H5_rest_init
17>rest_vol_file.obj : error LNK2001: unresolved external symbol __imp_curl_easy_strerror
17>rest_vol_group.obj : error LNK2001: unresolved external symbol __imp_curl_easy_strerror
17>rest_vol_link.obj : error LNK2001: unresolved external symbol __imp_curl_easy_strerror
17>rest_vol_object.obj : error LNK2001: unresolved external symbol __imp_curl_easy_strerror
17>rest_vol.obj : error LNK2001: unresolved external symbol __imp_curl_easy_strerror
17>rest_vol_attr.obj : error LNK2001: unresolved external symbol __imp_curl_easy_strerror
17>rest_vol_dataset.obj : error LNK2001: unresolved external symbol __imp_curl_easy_strerror
17>rest_vol_datatype.obj : error LNK2001: unresolved external symbol __imp_curl_easy_strerror
17>rest_vol.obj : error LNK2019: unresolved external symbol __imp_curl_easy_init referenced in function H5_rest_init
17>rest_vol_file.obj : error LNK2001: unresolved external symbol __imp_curl_easy_setopt
17>rest_vol_group.obj : error LNK2001: unresolved external symbol __imp_curl_easy_setopt
17>rest_vol_link.obj : error LNK2001: unresolved external symbol __imp_curl_easy_setopt
17>rest_vol_object.obj : error LNK2001: unresolved external symbol __imp_curl_easy_setopt
17>rest_vol.obj : error LNK2001: unresolved external symbol __imp_curl_easy_setopt
17>rest_vol_attr.obj : error LNK2001: unresolved external symbol __imp_curl_easy_setopt
17>rest_vol_dataset.obj : error LNK2001: unresolved external symbol __imp_curl_easy_setopt
17>rest_vol_datatype.obj : error LNK2001: unresolved external symbol __imp_curl_easy_setopt
17>rest_vol_file.obj : error LNK2001: unresolved external symbol __imp_curl_easy_perform
17>rest_vol_group.obj : error LNK2001: unresolved external symbol __imp_curl_easy_perform
17>rest_vol_link.obj : error LNK2001: unresolved external symbol __imp_curl_easy_perform
17>rest_vol_object.obj : error LNK2001: unresolved external symbol __imp_curl_easy_perform
17>rest_vol.obj : error LNK2001: unresolved external symbol __imp_curl_easy_perform
17>rest_vol_attr.obj : error LNK2001: unresolved external symbol __imp_curl_easy_perform
17>rest_vol_dataset.obj : error LNK2001: unresolved external symbol __imp_curl_easy_perform
17>rest_vol_datatype.obj : error LNK2001: unresolved external symbol __imp_curl_easy_perform
17>rest_vol.obj : error LNK2019: unresolved external symbol __imp_curl_easy_cleanup referenced in function H5_rest_term
17>rest_vol_file.obj : error LNK2001: unresolved external symbol __imp_curl_easy_getinfo
17>rest_vol_group.obj : error LNK2001: unresolved external symbol __imp_curl_easy_getinfo
17>rest_vol_link.obj : error LNK2001: unresolved external symbol __imp_curl_easy_getinfo
17>rest_vol_object.obj : error LNK2001: unresolved external symbol __imp_curl_easy_getinfo
17>rest_vol.obj : error LNK2001: unresolved external symbol __imp_curl_easy_getinfo
17>rest_vol_attr.obj : error LNK2001: unresolved external symbol __imp_curl_easy_getinfo
17>rest_vol_dataset.obj : error LNK2001: unresolved external symbol __imp_curl_easy_getinfo
17>rest_vol_datatype.obj : error LNK2001: unresolved external symbol __imp_curl_easy_getinfo
17>rest_vol_group.obj : error LNK2001: unresolved external symbol yajl_tree_parse
17>rest_vol_link.obj : error LNK2001: unresolved external symbol yajl_tree_parse
17>rest_vol_object.obj : error LNK2001: unresolved external symbol yajl_tree_parse
17>rest_vol.obj : error LNK2001: unresolved external symbol yajl_tree_parse
17>rest_vol_attr.obj : error LNK2001: unresolved external symbol yajl_tree_parse
17>rest_vol_dataset.obj : error LNK2001: unresolved external symbol yajl_tree_parse
17>rest_vol_datatype.obj : error LNK2001: unresolved external symbol yajl_tree_parse
17>rest_vol_group.obj : error LNK2001: unresolved external symbol yajl_tree_free
17>rest_vol_link.obj : error LNK2001: unresolved external symbol yajl_tree_free
17>rest_vol_object.obj : error LNK2001: unresolved external symbol yajl_tree_free
17>rest_vol.obj : error LNK2001: unresolved external symbol yajl_tree_free
17>rest_vol_attr.obj : error LNK2001: unresolved external symbol yajl_tree_free
17>rest_vol_dataset.obj : error LNK2001: unresolved external symbol yajl_tree_free
17>rest_vol_datatype.obj : error LNK2001: unresolved external symbol yajl_tree_free
17>rest_vol_group.obj : error LNK2001: unresolved external symbol yajl_tree_get
17>rest_vol_link.obj : error LNK2001: unresolved external symbol yajl_tree_get
17>rest_vol_object.obj : error LNK2001: unresolved external symbol yajl_tree_get
17>rest_vol.obj : error LNK2001: unresolved external symbol yajl_tree_get
17>rest_vol_attr.obj : error LNK2001: unresolved external symbol yajl_tree_get
17>rest_vol_dataset.obj : error LNK2001: unresolved external symbol yajl_tree_get
17>rest_vol_datatype.obj : error LNK2001: unresolved external symbol yajl_tree_get
17>C:\YetAnotherJSONParser\lib\yajl.lib : warning LNK4272: library machine type ‘x86’ conflicts with target machine type ‘x64’
17>F:\Dev\Windows\HDF5_REST_VOL\vol-rest\build\bin\Release\hdf5_vol_rest.dll : fatal error LNK1120: 16 unresolved externals
17>Done building project “hdf5_vol_rest-shared.vcxproj” – FAILED.

I look at the content of the curl library “C:\curl-7.77.0-win64-mingw\lib\libcurl.a” I gave as an argument to cmake and the curl symbols are present but without the _imp prefix.

For the “C:\YetAnotherJSONParser\lib\yajl.lib” the symbols are there but they are beginning with an “_”.

Thanks for your support.


#4

Since you’re building against a statically-built version of curl, you probably need to define CURL_STATICLIB for the project. I believe simply adding -DCURL_STATICLIB=ON to the cmake command will accomplish this. Previously, I had only built using a shared version of libcurl; I’ll make sure to document this!

As for linking libyajl, this stands out:

17>C:\YetAnotherJSONParser\lib\yajl.lib : warning LNK4272: library machine type ‘x86’ conflicts with target machine type ‘x64’

but I otherwise am not sure why the library’s symbols are not as expected. Did you build the YAJL project yourself or are you using a pre-built version from somewhere?


#5

I have rebuild the yajl library and the link problems are solved.

But the -DCURL_STATICLIB=ON is not recognized:
CMake Warning:
_ Manually-specified variables were not used by the project:_
_ CURL_STATICLIB_

What version of curl library are you using when building for Windows?


#6

Good to see you were able to fix the libyajl linking issue! For libcurl, I don’t remember exactly which version I used (it was in the 7.5x series), but I think this is really just an issue of figuring out the right place to define CURL_STATICLIB. You might try this patch: rest_vol.patch (570 Bytes)

This adds CURL_STATICLIB to the C source definitions by putting the declaration in the CMakeLists.txt right before calling find_package for libcurl. This isn’t a permanent solution, as it would be problematic for shared library versions of libcurl, but I think it should help your case until I can put in a CMake option to choose between the two while building.


#7

Your patch have solved the symbol name problem.

But there’s still a problem since we are using a static library. New there is a lot of missing symbols used by the curl library.:

15> Creating library F:/Dev/Windows/HDF5_REST_VOL/vol-rest/build/bin/Debug/hdf5_vol_rest.lib and object F:/Dev/Windows/HDF5_REST_VOL/vol-rest/build/bin/Debug/hdf5_vol_rest.exp
15>LINK : warning LNK4098: defaultlib ‘MSVCRT’ conflicts with use of other libs; use /NODEFAULTLIB:library
15>libcurl.a(version.o) : error LNK2019: unresolved external symbol zlibVersion referenced in function curl_version
15>libcurl.a(content_encoding.o) : error LNK2001: unresolved external symbol zlibVersion
15>libcurl.a(version.o) : error LNK2019: unresolved external symbol BrotliDecoderVersion referenced in function curl_version
15>libcurl.a(version.o) : error LNK2019: unresolved external symbol ZSTD_versionNumber referenced in function curl_version
15>libcurl.a(version.o) : error LNK2019: unresolved external symbol idn2_check_version referenced in function curl_version
15>libcurl.a(url.o) : error LNK2001: unresolved external symbol idn2_check_version
15>libcurl.a(version.o) : error LNK2019: unresolved external symbol gsasl_check_version referenced in function curl_version
15>libcurl.a(version.o) : error LNK2019: unresolved external symbol nghttp2_version referenced in function curl_version_info
15>libcurl.a(http2.o) : error LNK2001: unresolved external symbol nghttp2_version
15>libcurl.a(strerror.o) : error LNK2019: unresolved external symbol __imp__sys_nerr referenced in function Curl_strerror
15>libcurl.a(mprintf.o) : error LNK2019: unresolved external symbol ___chkstk_ms referenced in function dprintf_formatf
15>libcurl.a(cookie.o) : error LNK2001: unresolved external symbol ___chkstk_ms
15>libcurl.a(netrc.o) : error LNK2001: unresolved external symbol ___chkstk_ms
15>libcurl.a(formdata.o) : error LNK2001: unresolved external symbol ___chkstk_ms
15>libcurl.a(mprintf.o) : error LNK2019: unresolved external symbol __mingw_vsprintf referenced in function curl_mvfprintf
15>libcurl.a(system_win32.o) : error LNK2019: unresolved external symbol __imp_WSAStartup referenced in function Curl_win32_init
15>libcurl.a(system_win32.o) : error LNK2019: unresolved external symbol __imp_WSACleanup referenced in function Curl_win32_init
15>libcurl.a(asyn-thread.o) : error LNK2019: unresolved external symbol __imp_closesocket referenced in function destroy_async_data
15>libcurl.a(connect.o) : error LNK2001: unresolved external symbol __imp_closesocket
15>libcurl.a(hostip6.o) : error LNK2001: unresolved external symbol __imp_closesocket
15>libcurl.a(socketpair.o) : error LNK2001: unresolved external symbol __imp_closesocket
15>libcurl.a(schannel.o) : error LNK2019: unresolved external symbol __imp_WSAGetLastError referenced in function schannel_sha256sum
15>libcurl.a(ftp.o) : error LNK2001: unresolved external symbol __imp_WSAGetLastError
15>libcurl.a(telnet.o) : error LNK2001: unresolved external symbol __imp_WSAGetLastError
15>libcurl.a(tftp.o) : error LNK2001: unresolved external symbol __imp_WSAGetLastError
15>libcurl.a(asyn-thread.o) : error LNK2001: unresolved external symbol __imp_WSAGetLastError
15>libcurl.a(sendf.o) : error LNK2001: unresolved external symbol __imp_WSAGetLastError
15>libcurl.a(connect.o) : error LNK2001: unresolved external symbol __imp_WSAGetLastError
15>libcurl.a(openssl.o) : error LNK2001: unresolved external symbol __imp_WSAGetLastError
15>libcurl.a(telnet.o) : error LNK2001: unresolved external symbol __imp_send
15>libcurl.a(asyn-thread.o) : error LNK2001: unresolved external symbol __imp_send
15>libcurl.a(sendf.o) : error LNK2001: unresolved external symbol __imp_send
15>libcurl.a(multi.o) : error LNK2001: unresolved external symbol __imp_send
15>libcurl.a(socketpair.o) : error LNK2001: unresolved external symbol __imp_send
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_session_block_directions referenced in function ssh_do
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_session_init_ex referenced in function ssh_connect
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_session_callback_set referenced in function ssh_connect
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_session_flag referenced in function ssh_connect
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_knownhost_init referenced in function ssh_connect
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_knownhost_readfile referenced in function ssh_connect
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_session_free referenced in function ssh_connect
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_session_abstract referenced in function ssh_attach
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_init referenced in function Curl_ssh_init
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_exit referenced in function Curl_ssh_cleanup
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_session_set_blocking referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_knownhost_get referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_session_handshake referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_session_last_error referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_userauth_list referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_userauth_publickey_fromfile_ex referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_userauth_password_ex referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_agent_init referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_agent_connect referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_agent_list_identities referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_agent_get_identity referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_userauth_keyboard_interactive_ex referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_sftp_init referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_sftp_symlink_ex referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_sftp_stat_ex referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_sftp_last_error referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_sftp_mkdir_ex referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_sftp_rename_ex referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_sftp_rmdir_ex referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_sftp_unlink_ex referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_sftp_statvfs referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_sftp_open_ex referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_sftp_readdir_ex referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_sftp_close_handle referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_scp_send64 referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_scp_recv2 referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_channel_send_eof referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_channel_wait_eof referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_channel_wait_closed referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_channel_free referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_knownhost_free referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_agent_disconnect referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_agent_free referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_hostkey_hash referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_session_hostkey referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_knownhost_checkp referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_agent_userauth referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_userauth_authenticated referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_session_last_errno referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_sftp_shutdown referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_session_disconnect_ex referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_sftp_seek64 referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_knownhost_del referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_knownhost_add referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_knownhost_writefile referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_session_method_pref referenced in function Curl_ssh_version
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_channel_read_ex referenced in function sshkeycallback
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_channel_write_ex referenced in function sshkeycallback
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_sftp_read referenced in function sshkeycallback
15>libcurl.a(libssh2.o) : error LNK2019: unresolved external symbol libssh2_sftp_write referenced in function sshkeycallback
15>libcurl.a(url.o) : error LNK2019: unresolved external symbol idn2_free referenced in function conn_free
15>libcurl.a(url.o) : error LNK2019: unresolved external symbol idn2_lookup_ul referenced in function Curl_idnconvert_hostname
15>libcurl.a(url.o) : error LNK2019: unresolved external symbol idn2_strerror referenced in function Curl_idnconvert_hostname
15>libcurl.a(sendf.o) : error LNK2019: unresolved external symbol __imp_recv referenced in function Curl_send_plain
15>libcurl.a(connect.o) : error LNK2001: unresolved external symbol __imp_recv
15>libcurl.a(openssl.o) : error LNK2001: unresolved external symbol __imp_recv
15>libcurl.a(socketpair.o) : error LNK2001: unresolved external symbol __imp_recv
15>libcurl.a(multi.o) : error LNK2019: unresolved external symbol __imp_WSACreateEvent referenced in function Curl_multi_handle
15>libcurl.a(telnet.o) : error LNK2001: unresolved external symbol __imp_WSACreateEvent
15>libcurl.a(multi.o) : error LNK2019: unresolved external symbol __imp_WSAEventSelect referenced in function multi_wait
15>libcurl.a(telnet.o) : error LNK2001: unresolved external symbol __imp_WSAEventSelect
15>libcurl.a(multi.o) : error LNK2019: unresolved external symbol __imp_WSAWaitForMultipleEvents referenced in function multi_wait
15>libcurl.a(multi.o) : error LNK2019: unresolved external symbol __imp_WSAEnumNetworkEvents referenced in function multi_wait
15>libcurl.a(telnet.o) : error LNK2001: unresolved external symbol __imp_WSAEnumNetworkEvents
15>libcurl.a(multi.o) : error LNK2019: unresolved external symbol __imp_WSAResetEvent referenced in function multi_wait
15>libcurl.a(multi.o) : error LNK2019: unresolved external symbol __imp_WSASetEvent referenced in function curl_multi_wakeup
15>libcurl.a(multi.o) : error LNK2019: unresolved external symbol __imp_WSACloseEvent referenced in function curl_multi_cleanup
15>libcurl.a(telnet.o) : error LNK2001: unresolved external symbol __imp_WSACloseEvent
15>libcurl.a(imap.o) : error LNK2019: unresolved external symbol __mingw_vsscanf referenced in function imap_do
15>libcurl.a(telnet.o) : error LNK2001: unresolved external symbol __mingw_vsscanf
15>libcurl.a(rtsp.o) : error LNK2001: unresolved external symbol __mingw_vsscanf
15>libcurl.a(http_proxy.o) : error LNK2001: unresolved external symbol __mingw_vsscanf
15>libcurl.a(parsedate.o) : error LNK2001: unresolved external symbol __mingw_vsscanf
15>libcurl.a(urlapi.o) : error LNK2001: unresolved external symbol __mingw_vsscanf
15>libcurl.a(http.o) : error LNK2001: unresolved external symbol __mingw_vsscanf
15>libcurl.a(ftp.o) : error LNK2001: unresolved external symbol __mingw_vsscanf
15>libcurl.a(altsvc.o) : error LNK2001: unresolved external symbol __mingw_vsscanf
15>libcurl.a(hsts.o) : error LNK2001: unresolved external symbol __mingw_vsscanf
15>libcurl.a(cookie.o) : error LNK2001: unresolved external symbol __mingw_vsscanf
15>libcurl.a(hostip.o) : error LNK2001: unresolved external symbol __mingw_vsscanf
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_submit_rst_stream referenced in function Curl_http2_done
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_send referenced in function Curl_http2_done
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_set_stream_user_data referenced in function Curl_http2_done
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_pack_settings_payload referenced in function Curl_http2_request_upgrade
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_resume_data referenced in function Curl_http2_done_sending
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_want_write referenced in function Curl_http2_done_sending
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_priority_spec_init referenced in function Curl_http2_done_sending
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_submit_priority referenced in function Curl_http2_done_sending
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_mem_recv referenced in function h2_process_pending_input
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_strerror referenced in function h2_process_pending_input
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_check_request_allowed referenced in function h2_process_pending_input
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_want_read referenced in function h2_process_pending_input
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_callbacks_new referenced in function Curl_http2_setup
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_callbacks_set_send_callback referenced in function Curl_http2_setup
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_callbacks_set_on_frame_recv_callback referenced in function Curl_http2_setup
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_callbacks_set_on_data_chunk_recv_callback referenced in function Curl_http2_setup
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_callbacks_set_on_stream_close_callback referenced in function Curl_http2_setup
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_callbacks_set_on_begin_headers_callback referenced in function Curl_http2_setup
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_callbacks_set_on_header_callback referenced in function Curl_http2_setup
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_callbacks_set_error_callback referenced in function Curl_http2_setup
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_client_new referenced in function Curl_http2_setup
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_callbacks_del referenced in function Curl_http2_setup
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_upgrade2 referenced in function Curl_http2_switched
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_submit_settings referenced in function Curl_http2_switched
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_set_local_window_size referenced in function Curl_http2_switched
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_is_fatal referenced in function http2_send
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_submit_request referenced in function http2_send
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_del referenced in function http2_disconnect
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_submit_ping referenced in function http2_conncheck
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_get_stream_user_data referenced in function http2_conncheck
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_get_remote_settings referenced in function http2_conncheck
15>libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_http2_strerror referenced in function http2_conncheck
15>libcurl.a(connect.o) : error LNK2019: unresolved external symbol __imp_ntohs referenced in function Curl_addr2string
15>libcurl.a(ftp.o) : error LNK2001: unresolved external symbol __imp_ntohs
15>libcurl.a(socks_sspi.o) : error LNK2001: unresolved external symbol __imp_ntohs
15>libcurl.a(connect.o) : error LNK2019: unresolved external symbol __imp_getpeername referenced in function Curl_conninfo_remote
15>libcurl.a(connect.o) : error LNK2019: unresolved external symbol __imp_getsockname referenced in function Curl_conninfo_local
15>libcurl.a(socketpair.o) : error LNK2001: unresolved external symbol __imp_getsockname
15>libcurl.a(ftp.o) : error LNK2001: unresolved external symbol __imp_getsockname
15>libcurl.a(connect.o) : error LNK2019: unresolved external symbol __imp_getsockopt referenced in function Curl_is_connected
15>libcurl.a(connect.o) : error LNK2019: unresolved external symbol __imp_WSASetLastError referenced in function Curl_is_connected
15>libcurl.a(curl_addrinfo.o) : error LNK2001: unresolved external symbol __imp_WSASetLastError
15>libcurl.a(select.o) : error LNK2001: unresolved external symbol __imp_WSASetLastError
15>libcurl.a(connect.o) : error LNK2019: unresolved external symbol __imp_setsockopt referenced in function Curl_sndbufset
15>libcurl.a(socketpair.o) : error LNK2001: unresolved external symbol __imp_setsockopt
15>libcurl.a(transfer.o) : error LNK2001: unresolved external symbol __imp_setsockopt
15>libcurl.a(connect.o) : error LNK2019: unresolved external symbol __imp_WSAIoctl referenced in function Curl_connecthost
15>libcurl.a(transfer.o) : error LNK2001: unresolved external symbol __imp_WSAIoctl
15>libcurl.a(smb.o) : error LNK2001: unresolved external symbol __imp_htons
15>libcurl.a(doh.o) : error LNK2001: unresolved external symbol __imp_htons
15>libcurl.a(socks_sspi.o) : error LNK2001: unresolved external symbol __imp_htons
15>libcurl.a(connect.o) : error LNK2001: unresolved external symbol __imp_htons
15>libcurl.a(curl_addrinfo.o) : error LNK2001: unresolved external symbol __imp_htons
15>libcurl.a(ftp.o) : error LNK2001: unresolved external symbol __imp_htons
15>libcurl.a(telnet.o) : error LNK2001: unresolved external symbol __imp_htons
15>libcurl.a(connect.o) : error LNK2019: unresolved external symbol __imp_bind referenced in function Curl_connecthost
15>libcurl.a(socketpair.o) : error LNK2001: unresolved external symbol __imp_bind
15>libcurl.a(ftp.o) : error LNK2001: unresolved external symbol __imp_bind
15>libcurl.a(tftp.o) : error LNK2001: unresolved external symbol __imp_bind
15>libcurl.a(connect.o) : error LNK2019: unresolved external symbol __imp_connect referenced in function Curl_connecthost
15>libcurl.a(socketpair.o) : error LNK2001: unresolved external symbol __imp_connect
15>libcurl.a(connect.o) : error LNK2019: unresolved external symbol __imp_socket referenced in function Curl_connalive
15>libcurl.a(hostip6.o) : error LNK2001: unresolved external symbol __imp_socket
15>libcurl.a(socketpair.o) : error LNK2001: unresolved external symbol imp_socket
15>libcurl.a(content_encoding.o) : error LNK2019: unresolved external symbol inflateInit
referenced in function deflate_init_writer
15>libcurl.a(content_encoding.o) : error LNK2019: unresolved external symbol inflateEnd referenced in function deflate_unencode_write
15>libcurl.a(content_encoding.o) : error LNK2019: unresolved external symbol inflate referenced in function deflate_close_writer
15>libcurl.a(content_encoding.o) : error LNK2019: unresolved external symbol inflateInit2
referenced in function deflate_close_writer
15>libcurl.a(content_encoding.o) : error LNK2019: unresolved external symbol BrotliDecoderCreateInstance referenced in function brotli_init_writer
15>libcurl.a(content_encoding.o) : error LNK2019: unresolved external symbol BrotliDecoderDecompressStream referenced in function brotli_unencode_write
15>libcurl.a(content_encoding.o) : error LNK2019: unresolved external symbol BrotliDecoderDestroyInstance referenced in function brotli_unencode_write
15>libcurl.a(content_encoding.o) : error LNK2019: unresolved external symbol BrotliDecoderGetErrorCode referenced in function brotli_unencode_write
15>libcurl.a(content_encoding.o) : error LNK2019: unresolved external symbol ZSTD_createDStream referenced in function zstd_init_writer
15>libcurl.a(content_encoding.o) : error LNK2019: unresolved external symbol ZSTD_decompressStream referenced in function zstd_unencode_write

and more…


#8

Hmm, you might refer to https://github.com/Microsoft/vcpkg/issues/2621 on this. It seems there are several other libraries that are missing at link time here, including zlib and windows system libraries. You might need to track down which extra libraries curl needs to link correctly.

Otherwise, would it be possible to try building or getting a build of curl that’s built as a shared library? It seems some more testing needs to be done for static library builds, but shared library builds were tested and working.