I did this
With the deprecation of winbuild I'm trying to build on Windows using cmake.
I'm using a back level VS 2017 :
** Visual Studio 2017 Developer Command Prompt v15.6.4
** Copyright (c) 2017 Microsoft Corporation
which includes cmake 3.10, and I'm hitting an error :
CMake Error at lib/CMakeLists.txt:110 (target_link_libraries):
Object library target "libcurl_object" may not link to anything.
This fails for CMake 3.10.3, and 3.11.4, but it works for CMake 3.12.0 and later.
I am running commands:
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvarsall.bat" x86
mkdir ..\curl-build
cd ..\curl-build
cmake -A Win32 -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF -DENABLE_IPV6=ON -DCURL_WINDOWS_SSPI=NO -DCURL_USE_LIBSSH2=OFF -DUSE_NGHTTP2=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF -DCURL_ZLIB=OFF ..\curl-8.12.1
But this also fails for a 64 bit make (omitting the -A Win32).
The output from a failing (3.11.4) cmake command is :
-- Building for: Visual Studio 15 2017
-- Using CMake version 3.11.4
-- curl version=[8.12.1]
-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.19045.
-- The C compiler identification is MSVC 19.16.27053.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- CMake platform flags: WIN32 MSVC-1916
-- Performing Test HAVE_WIN32_WINNT
-- Performing Test HAVE_WIN32_WINNT - Success
-- Found _WIN32_WINNT=0x0a00
-- Could NOT find Perl (missing: PERL_EXECUTABLE)
-- Could NOT find Brotli (missing: BROTLI_INCLUDE_DIR BROTLIDEC_LIBRARY BROTLICOMMON_LIBRARY)
-- Could NOT find Zstd (missing: ZSTD_INCLUDE_DIR ZSTD_LIBRARY)
-- 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 long long
-- Check size of long long - done
-- Check size of long
-- Check size of long - done
-- Check size of int
-- Check size of int - done
-- Check size of __int64
-- Check size of __int64 - done
-- Check size of time_t
-- Check size of time_t - done
-- Check size of ADDRESS_FAMILY
-- Check size of ADDRESS_FAMILY - done
-- Check size of off_t
-- Check size of off_t - done
-- Check size of curl_off_t
-- Check size of curl_off_t - done
-- Check size of curl_socket_t
-- Check size of curl_socket_t - done
CMake Error at lib/CMakeLists.txt:110 (target_link_libraries):
Object library target "libcurl_object" may not link to anything.
-- Configuring incomplete, errors occurred!
See also "C:/Users/Administrator/broot/curl-build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Administrator/broot/curl-build/CMakeFiles/CMakeError.log".
The error files are attached.
The output from a successful (3.12.0) cmake command is :
-- Building for: Visual Studio 15 2017
-- Using CMake version 3.12.0
-- curl version=[8.12.1]
-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.19045.
-- The C compiler identification is MSVC 19.16.27053.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- CMake platform flags: WIN32 MSVC-1916
-- Performing Test HAVE_WIN32_WINNT
-- Performing Test HAVE_WIN32_WINNT - Success
-- Found _WIN32_WINNT=0x0a00
-- Could NOT find Perl (missing: PERL_EXECUTABLE)
-- Could NOT find Brotli (missing: BROTLI_INCLUDE_DIR BROTLIDEC_LIBRARY BROTLICOMMON_LIBRARY)
-- Could NOT find Zstd (missing: ZSTD_INCLUDE_DIR ZSTD_LIBRARY)
-- 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 long long
-- Check size of long long - done
-- Check size of long
-- Check size of long - done
-- Check size of int
-- Check size of int - done
-- Check size of __int64
-- Check size of __int64 - done
-- Check size of time_t
-- Check size of time_t - done
-- Check size of ADDRESS_FAMILY
-- Check size of ADDRESS_FAMILY - done
-- Check size of off_t
-- Check size of off_t - done
-- Check size of curl_off_t
-- Check size of curl_off_t - done
-- Check size of curl_socket_t
-- Check size of curl_socket_t - done
-- Protocols: dict file ftp gopher http imap ipfs ipns ldap ldaps mqtt pop3 rtsp smb smtp telnet tftp ws
-- Features: AsynchDNS IPv6 Largefile NTLM UnixSockets alt-svc threadsafe
-- Enabled SSL backends:
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Administrator/broot/curl-build
CMakeOutput.log
CMakeError.log
I expected the following
CMakeLists.txt says
make_minimum_required(VERSION 3.7...3.16 FATAL_ERROR)
...so I expected CMake to succeed on CMake 3.10 and 3.11
Is target_link_libraries() depending on a feature which is only available in CMake 3.12 and later?
curl/libcurl version
curl 8.12.1
operating system
Windows 10 Professional
** Visual Studio 2017 Developer Command Prompt v15.6.4
CMake < 3.12
I did this
With the deprecation of winbuild I'm trying to build on Windows using cmake.
I'm using a back level VS 2017 :
which includes cmake 3.10, and I'm hitting an error :
This fails for CMake 3.10.3, and 3.11.4, but it works for CMake 3.12.0 and later.
I am running commands:
But this also fails for a 64 bit make (omitting the -A Win32).
The output from a failing (3.11.4) cmake command is :
The error files are attached.
The output from a successful (3.12.0) cmake command is :
CMakeOutput.log
CMakeError.log
I expected the following
CMakeLists.txt says
...so I expected CMake to succeed on CMake 3.10 and 3.11
Is target_link_libraries() depending on a feature which is only available in CMake 3.12 and later?
curl/libcurl version
curl 8.12.1
operating system
Windows 10 Professional
** Visual Studio 2017 Developer Command Prompt v15.6.4
CMake < 3.12