libCurl x64构建问题Visual Studio 2013(x64)Visual Studio& CMake [英] libCurl x64 build problems Visual Studio 2013 (x64) Visual Studio & CMake

查看:1286
本文介绍了libCurl x64构建问题Visual Studio 2013(x64)Visual Studio& CMake的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Windows 8.1 x64上构建libCurl x64,我有链接器错误。我需要能够做到这一点,因为我需要创建一个64位调试版本的库,以便我可以跟踪一些奇怪的FTP相关的协议问题,我遇到。

I am trying to build libCurl x64 on Windows 8.1 x64 and I am having linker errors. I need to be able to do this as I need to create a 64 bit debug version of the library so that I can trace some strange FTP related protocol issues I am encountering.

基本错误输出(为了简洁而修剪)如下

The fundamental error output (trimmed for brevity) is as follows


1 > ------ Build started:Project:ZERO_CHECK,Configuration:Debug x64

1>------ Build started: Project: ZERO_CHECK, Configuration: Debug x64

...

2> C:\Users\jcoffey\main\extlibs\curl-7.35.0\lib\smtp.c(2174):warning
C4267:'+ =':conversion from 'size_t'到'long',可能丢失
数据2> pingpong.c 2> rtsp.c 2> curl_threads.c 2> warnless.c 2>
hmac.c 2> curl_rtmp.c 2> openldap.c 2> curl_gethostname.c 2>
gopher.c 2>生成代码... 2>编译... 2> idn_win32.c 2>
http_negotiate_sspi.c 2> http_proxy。 c 2> non-ascii.c 2> asyn-ares.c
2> asyn-thread.c 2> curl_gssapi.c 2> curl_ntlm.c 2> curl_ntlm_wb.c
2> curl_ntlm_core.c 2> curl_ntlm_msgs.c 2> curl_sasl.c 2>
curl_multibyte.c 2> hostcheck.c 2> bundles.c 2> conncache.c 2>
pipeline.c 2> dotdot.c 2> x509asn1.c 2> http2.c 2>生成
代码... 2>编译... 2> openssl.c 2> gtls.c 2> vtls.c 2> nss.c
2 > qssl.c 2> polarssl.c 2> polarssl_threadlock.c 2> axtls.c 2>
cyassl.c 2> curl_schannel.c 2> curl_darwinssl.c 2> gskit.c 2>
生成代码...

2>C:\Users\jcoffey\main\extlibs\curl-7.35.0\lib\smtp.c(2174): warning C4267: '+=' : conversion from 'size_t' to 'long', possible loss of data 2> pingpong.c 2> rtsp.c 2> curl_threads.c 2> warnless.c 2> hmac.c 2> curl_rtmp.c 2> openldap.c 2> curl_gethostname.c 2> gopher.c 2> Generating Code... 2> Compiling... 2> idn_win32.c 2> http_negotiate_sspi.c 2> http_proxy.c 2> non-ascii.c 2> asyn-ares.c 2> asyn-thread.c 2> curl_gssapi.c 2> curl_ntlm.c 2> curl_ntlm_wb.c 2> curl_ntlm_core.c 2> curl_ntlm_msgs.c 2> curl_sasl.c 2> curl_multibyte.c 2> hostcheck.c 2> bundles.c 2> conncache.c 2> pipeline.c 2> dotdot.c 2> x509asn1.c 2> http2.c 2> Generating Code... 2> Compiling... 2> openssl.c 2> gtls.c 2> vtls.c 2> nss.c 2> qssl.c 2> polarssl.c 2> polarssl_threadlock.c 2> axtls.c 2> cyassl.c 2> curl_schannel.c 2> curl_darwinssl.c 2> gskit.c 2> Generating Code...

...

2> x64 \Debug\file.obj:fatal错误LNK1112:模块
机器类型'x64'与目标机器类型'X86'冲突3> ------
Build started:Project:curl,Configuration:Debug x64 ------ 3>
构建自定义规则
C:/Users/jcoffey/main/extlibs/curl-7.35.0/src/CMakeLists.txt

2>x64\Debug\file.obj : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86' 3>------ Build started: Project: curl, Configuration: Debug x64 ------ 3> Building Custom Rule C:/Users/jcoffey/main/extlibs/curl-7.35.0/src/CMakeLists.txt

请帮助 - 我已经搜索论坛和stackoverflow类似的东西,但没有效果。我可以成功地在x86(win32)模式下构建,但是我在目标x64时出现链接错误。

Please help - I have searched the forums and stackoverflow for something similar but to no avail. I was able to successfully build in x86 (win32) mode but I am having linkage errors when I target x64.

步骤1:
下载最新版本 CMake 2.8.12.2 &更新Windows PATH 环境(在我的情况下,我使用的MINMGW32 bash shell提示,但我得到完全相同的链接问题,如果我使用本机visual studio 2013 x64 shell运行cmake从



Step 1: Download latest CMake 2.8.12.2 & update the Windows PATH environment (in my case I am using the MINMGW32 bash shell prompt, but I get exactly the same linkage problems if I use the native visual studio 2013 x64 shell to run cmake from)


$ export PATH = $ PATH:/ c / Program\ Files\(x86)/ CMake\ 2.8 / bin

$ export PATH=$PATH:/c/Program\ Files\ (x86)/CMake\ 2.8/bin

验证Windows上的Cmake的路径和版本

verify that the path and version of Cmake on windows


$ cmake --version cmake version 2.8.12.2

$ cmake --version cmake version 2.8.12.2

步骤2: -7.35.0到文件夹c:\temp\curl-7.35.0,并创建一个并行文件夹c:\temp\curl-7.35.0 \build。

Step 2: extract curl-7.35.0 into a folder c:\temp\curl-7.35.0" and make a parallel folder "c:\temp\curl-7.35.0\build".

第3步:
更改为构建文件夹,并运行Cmake将Visual Studio 12作为所需的Visual Studio解决方案/项目组合创建

Step 3: Change into the build folder and run Cmake targeting "Visual Studio 12" as the desired Visual Studio Solution/project combination to create


$ cmake -GVisual Studio 12../ curl-7.35.0

$ cmake -G "Visual Studio 12" ../curl-7.35.0

这产生了大量的输出,如下所示,但它也创建了一个针对机器类型X86的可行的Visual Studio解决方案。

This produces a ton of output as follows, but it does also create a workable visual studio solution targeted for a machine type X86.


$ cmake -GVisual Studio 12../curl-7.35.0
- C编译器标识是MSVC 18.0.21005.1
- 检查工作C编译器使用:Visual Studio 12
- 检查工作C编译器使用:Visual Studio 12 - 工作
- 检测C编译器ABI信息
- 检测C编译器ABI信息 - 完成CMake警告在CMakeLists.txt:47(消息):curl cmake构建系统糟糕
维护。注意

$ cmake -G "Visual Studio 12" ../curl-7.35.0 -- The C compiler identification is MSVC 18.0.21005.1 -- Check for working C compiler using: Visual Studio 12 -- Check for working C compiler using: Visual Studio 12 -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done CMake Warning at CMakeLists.txt:47 (message): the curl cmake build system is poorly maintained. Be aware

- curl version = [7.35.0]
- 在ws2_32中寻找getch;
- 在ws2_32中寻找getch; - found
- 在winmm中查找getch; ws2_32
- 在winmm中查找getch; ws2_32 - found
- 在wldap32中查找cldap_open
- 查找cldap_open在wldap32中找到$​​ b $ b - 在idn; winmm中查找idna_to_ascii_lz - 在idn; winmm中查找idna_to_ascii_lz - 找不到
- 在ldap中查找ldap_init; winmm ; ws2_32
- 在ldap; winmm中查找ldap_init - 找不到ws2_32
- 找不到OpenSSL,尝试在系统变量OPENSSL_ROOT_DIR中设置OpenSSL根文件夹的路径(缺少:OPENSSL_LIBRARIES
OPENSSL_INCLUDE_DIR)

-- curl version=[7.35.0] -- Looking for getch in ws2_32; -- Looking for getch in ws2_32; - found -- Looking for getch in winmm;ws2_32 -- Looking for getch in winmm;ws2_32 - found -- Looking for cldap_open in wldap32 -- Looking for cldap_open in wldap32 - found -- Looking for idna_to_ascii_lz in idn;winmm;ws2_32 -- Looking for idna_to_ascii_lz in idn;winmm;ws2_32 - not found -- Looking for ldap_init in ldap;winmm;ws2_32 -- Looking for ldap_init in ldap;winmm;ws2_32 - not found -- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the sys tem variable OPENSSL_ROOT_DIR (missing: OPENSSL_LIBRARIES OPENSSL_INCLUDE_DIR)

- 寻找包含文件ws2tcpip.h
- 寻找包含文件ws2tcpip.h - found
- - 寻找包含文件ws2tcpip.h,winsock2.h
- 寻找包含文件ws2tcpip.h,winsock2.h - found
- 寻找3个包含文件ws2tcpip.h,..., stdio.h
- 寻找3个包含文件ws2tcpip.h,...,stdio.h - found
- 寻找4个包含文件ws2tcpip.h,...,windows.h
- 寻找4个包含文件ws2tcpip.h,...,windows.h - found
- 寻找5个包含文件ws2tcpip.h,...,winsock.h
- - 寻找5个包含文件ws2tcpip.h,...,winsock.h - found
- 寻找6个包含文件ws2tcpip.h,...,sys / filio.h
- 查找for 6包含文件ws2tcpip.h,...,sys / filio.h - 未找到
- 寻找6个包含文件ws2tcpip.h,...,sys / ioctl.h
- 寻找6个包含文件ws2tcpip.h,...,sys / ioctl.h - 未找到
- 寻找6个包含文件ws2tcpip.h,...,sys / resource.h
- - 寻找6个包含文件ws2tcpip.h,...,sys / resource.h - 未找到
- 寻找8个包含文件ws2tcpip.h,...,sys / uio.h
- 寻找8个包含文件ws2tcpip.h,...,sys / uio.h - 未找到
- 寻找8个包含文件ws2tcpip.h,...,sys / un.h
- 寻找8个包含文件ws2tcpip.h,...,sys / un.h - 未找到
- 寻找9个包含文件ws2tcpip.h,...,arpa / tftp.h
- 寻找9个包含文件ws2tcpip.h,...,arpa / tftp.h - 找不到
- 寻找9个包含文件ws2tcpip.h,...,assert.h
- 寻找9个包含文件ws2tcpip.h,...,assert.h - found
- 寻找10个包含文件ws2tcpip.h,...,crypto.h
- 查找for 10包含文件ws2tcpip.h,...,crypto.h - 未找到
- 寻找10个包含文件ws2tcpip.h,...,des.h
- 寻找10包括文件ws2tcpip.h,...,des.h - 找不到
- 寻找10个包含文件ws2tcpip.h,...,err.h
- 寻找10个包含文件ws2tcpip。 h,...,err.h - 未找到
- 寻找10个包含文件ws2tcpip.h,...,errno.h
- 寻找10个包含文件ws2tcpip.h,。 ..,errno.h - found
- 寻找12个包含文件ws2tcpip.h,...,gssapi / gssapi.h
- 寻找12个包含文件ws2tcpip.h,... ,gssapi / gssapi.h - 找不到
- 寻找12个包含文件ws2tcpip.h,...,gssapi / gssapi_generic.h
- 寻找12个包含文件ws2tcpip.h,.. ,GSSAPI / gssapi_generic.h - 不˚Found
- 寻找12包含文件ws2tcpip.h,...,GSSAPI / gssapi_krb5.h
- 寻找12包含文件ws2tcpip.h, ...,gssapi / gssapi_krb5.h - not foun d
- 寻找12个包含文件ws2tcpip.h,...,idn-free.h
- 寻找12个包含文件ws2tcpip。 h,...,idn-free.h - 未找到
- 寻找12个包含文件ws2tcpip.h,...,ifaddrs.h
- 寻找12个包含文件ws2tcpip.h ,...,ifaddrs.h - 未找到
- 寻找13个包含文件ws2tcpip.h,...,krb.h
- 寻找13个包含文件ws2tcpip.h,.. 。,krb.h - not found
- 寻找13个包含文件ws2tcpip.h,...,libgen.h
- 寻找13个包含文件ws2tcpip.h,...,libgen .h - not found
- 寻找13个包含文件ws2tcpip.h,...,libssh2.h
- 寻找13个包含文件ws2tcpip.h,...,libssh2.h - 找不到
- 寻找13个包含文件ws2tcpip.h,...,limits.h
- 寻找13个包含文件ws2tcpip.h,...,limits.h - found
- 寻找14个包含文件ws2tcpip.h,...,locale.h
- 寻找14个包含文件ws2tcpip.h,...,locale.h - found
- 查找15个包含文件ws2tcpip.h,...,netinet / tcp.h
- 查找15个包含文件ws2tcpip.h,...,netinet / tcp.h - 未找到
- - 寻找15个包含文件ws2tcpip.h,...,pem.h
- 寻找15个包含文件ws2tcpip.h,...,pem.h - 未找到
- 寻找15包含文件ws2tcpip.h,...,poll.h
- 寻找15个包含文件ws2tcpip.h,...,poll.h - 未找到
- 寻找15个包含文件ws2tcpip.h,...,rsa.h
- 寻找15个包含文件ws2tcpip.h,...,rsa.h - 未找到
- 寻找17个包含文件ws2tcpip.h ,...,ssl.h
- 查找17个包含文件ws2tcpip.h,...,ssl.h - 未找到
- 查找17个包含文件ws2tcpip.h,.. 。,stdbool.h
- 寻找17个包含文件ws2tcpip.h,...,stdbool.h - found
- 寻找21个包含文件ws2tcpip.h,...,stropts。 h
- 寻找21个包含文件ws2tcpip.h,...,stropts.h - 未找到
- 寻找22个包含文件ws2tcpip.h,...,tld.h
- 寻找22个包含文件ws2tcpip.h,...,tld.h - 未找到
- 寻找23个包含文件ws2tcpip.h,...,stddef.h
- - 寻找23个包含文件ws2tcpip.h,...,stddef.h - found
- 寻找26个包含文件ws2tcpip.h,...,ldap.h
- 寻找26包含文件ws2tcpip.h,...,ldap.h - 未找到
- 寻找26个包含文件ws2tcpip.h,...,sys / utsname.h
- 寻找26包括文件ws2tcpip.h,...,sys / utsname.h - 未找到
- 寻找26个包含文件ws2tcpip.h,...,idna.h
- 寻找26个包含文件ws2tcpip.h,...,idna.h - 未找到
- 未找到LDAP_H CURL_DISABLE_LDAP设置ON
- 需要启用LDAP以支持LDAPS
- 检查size_t大小
- 检查size_t的大小 - done
- 检查ssize_t的大小
- 检查ssize_t的大小 - 失败
- 检查long long的大小
- - 检查long long-done的大小
- 检查long的长度
- 检查long-done的大小
- 检查short的大小
- 检查short的大小 - done
- 检查int的大小
- 检查int的大小
- 检查__int64的大小
- 检查__int64的大小 - 完成
- 检查time_t
的大小 - 检查time_t - done的大小
- 查找basename
- 查找basename - 找不到
- 查找strncmpi
- 寻找strncmpi - 没有找到
- 寻找报警
- 寻找报警器 - 未找到
- 寻找CRYPTO_cleanup_all_ex_data
- 寻找CRYPTO_cleanup_all_ex_data - 找不到
- 寻找gethostbyname
- 寻找gethostbyname - found
- 寻找strtoll
- 寻找strtoll - found
- 寻找_strtoi64
- 寻找_strtoi64 - found
- 寻找strerror_r
- 寻找strerror_r - 未找到
- 寻找siginterrupt
- 寻找未找到
- 寻找fork
- 寻找fork - not found
- 寻找freeaddrinfo
- 寻找freeaddrinfo - found
- - 寻找freeifaddrs
- 寻找freeifaddrs - 找不到
- 寻找pipe
- 寻找pipe - 未找到
- 寻找ftruncate
- 寻找ftruncate - 未找到
- 寻找getprotobyname
- 寻找getprotobyname - found
- 寻找getrlimit
- 寻找getrlimit - 找不到
- 寻找idn_free
- 寻找idn_free - 未找到
- 寻找idna_strerror
- 寻找idna_strerror - 未找到
- 寻找tld_strerror
- 寻找tld_strerror - 未找到
- 寻找setlocale
- 寻找setlocale - found
- 寻找setrlimit
- 寻找setrlimit - 未找到
- 寻找fcntl
- 寻找fcntl - 未找到
- 寻找ioctl
- 寻找ioctl - 找不到
- - 寻找setsockopt
- 寻找setsockopt - found
- 寻找inet_pton
- 寻找inet_pton - 未找到
- 执行卷曲测试HAVE_FCNTL_O_NONBLOCK
- 执行卷曲测试HAVE_FCNTL_O_NONBLOCK - 失败
- 执行卷曲测试HAVE_IOCTLSOCKET
- 执行卷曲测试HAVE_IOCTLSOCKET - 成功
- 执行卷曲测试HAVE_IOCTLSOCKET_CAMEL
- 执行卷曲测试HAVE_IOCTLSOCKET_CAMEL - 失败的
- 执行卷曲测试HAVE_IOCTLSOCKET_CAMEL_FIONBIO
- 执行卷曲测试HAVE_IOCTLSOCKET_CAMEL_FIONBIO - 成功
- 执行卷曲测试HAVE_IOCTLSOCKET_FIONBIO
- 执行卷曲测试HAVE_IOCTLSOCKET_FIONBIO - 成功
- 执行卷曲测试HAVE_IOCTL_FIONBIO
- 执行卷曲测试HAVE_IOCTL_FIONBIO - 失败
- 执行卷曲测试HAVE_IOCTL_SIOCGIFADDR
- 执行卷曲测试HAVE_IOCTL_SIOCGIFADDR - 失败
- 执行卷曲测试HAVE_SETSOCKOPT_SO_NONBLOCK
- 执行卷曲测试HAVE_SETSOCKOPT_SO_NONBLOCK - 失败
- 执行卷曲测试HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
- 执行卷曲测试HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID - 失败
- 执行卷曲测试HAVE_SOCKLEN_T
- 执行卷曲测试HAVE_SOCKLEN_T - 成功
- 执行卷曲测试HAVE_BOOL_T
- 执行卷曲测试HAVE_BOOL_T - 成功
- 执行卷曲测试HAVE_FILE_OFFSET_BITS
- 执行卷曲测试HAVE_FILE_OFFSET_BITS - 失败
- 执行卷曲测试HAVE_GLIBC_STRERROR_R
- 执行卷曲测试HAVE_GLIBC_STRERROR_R - 失败
- 执行卷曲测试HAVE_POSIX_STRERROR_R
- 执行卷曲测试HAVE_POSIX_STRERROR_R - 失败
- 检查大小curl_off_t
- 检查curl_off_t的大小 - 失败
- 检查大小socklen_t
- 检查大小socklen_t - done
- 执行测试curl_cv_recv
- 执行测试curl_cv_recv - 成功
- 执行测试int recv(int,void *,size_t,int)(curl_cv_func_recv_test)
- 执行测试int recv(int,void *,size_t,int )(curl_cv_func_recv_test) - Success
- 执行测试curl_cv_send
- 执行测试curl_cv_send - 成功
- 执行测试int send(int,const void *,size_t,int)(curl_cv_func_send_t est )
- 执行测试int send(int,const void *,size_t,int)(curl_cv_func_send_t est) - Success
- 执行测试HAVE_MSG_NOSIGNAL
- 执行测试HAVE_MSG_NOSIGNAL - 失败
- 执行测试HAVE_STRUCT_TIMEVAL
- 执行测试HAVE_STRUCT_TIMEVAL - 成功
- 执行测试HAVE_POLL_FINE
- 执行测试HAVE_POLL_FINE - 失败
- 检查sig_atomic_t $ b的大小$ b - 检查大小sig_atomic_t - done
- 执行测试HAVE_SIG_ATOMIC_T_NOT_VOLATILE
- 执行测试HAVE_SIG_ATOMIC_T_NOT_VOLATILE - 成功
- 检查结构大小sockaddr_storage
- 检查大小struct sockaddr_storage - 失败的CMake警告(dev)在测试/ CMakeLists.txt:1(add_subdirectory):源目录

-- Looking for include file ws2tcpip.h -- Looking for include file ws2tcpip.h - found -- Looking for include files ws2tcpip.h, winsock2.h -- Looking for include files ws2tcpip.h, winsock2.h - found -- Looking for 3 include files ws2tcpip.h, ..., stdio.h -- Looking for 3 include files ws2tcpip.h, ..., stdio.h - found -- Looking for 4 include files ws2tcpip.h, ..., windows.h -- Looking for 4 include files ws2tcpip.h, ..., windows.h - found -- Looking for 5 include files ws2tcpip.h, ..., winsock.h -- Looking for 5 include files ws2tcpip.h, ..., winsock.h - found -- Looking for 6 include files ws2tcpip.h, ..., sys/filio.h -- Looking for 6 include files ws2tcpip.h, ..., sys/filio.h - not found -- Looking for 6 include files ws2tcpip.h, ..., sys/ioctl.h -- Looking for 6 include files ws2tcpip.h, ..., sys/ioctl.h - not found -- Looking for 6 include files ws2tcpip.h, ..., sys/resource.h -- Looking for 6 include files ws2tcpip.h, ..., sys/resource.h - not found -- Looking for 8 include files ws2tcpip.h, ..., sys/uio.h -- Looking for 8 include files ws2tcpip.h, ..., sys/uio.h - not found -- Looking for 8 include files ws2tcpip.h, ..., sys/un.h -- Looking for 8 include files ws2tcpip.h, ..., sys/un.h - not found -- Looking for 9 include files ws2tcpip.h, ..., arpa/tftp.h -- Looking for 9 include files ws2tcpip.h, ..., arpa/tftp.h - not found -- Looking for 9 include files ws2tcpip.h, ..., assert.h -- Looking for 9 include files ws2tcpip.h, ..., assert.h - found -- Looking for 10 include files ws2tcpip.h, ..., crypto.h -- Looking for 10 include files ws2tcpip.h, ..., crypto.h - not found -- Looking for 10 include files ws2tcpip.h, ..., des.h -- Looking for 10 include files ws2tcpip.h, ..., des.h - not found -- Looking for 10 include files ws2tcpip.h, ..., err.h -- Looking for 10 include files ws2tcpip.h, ..., err.h - not found -- Looking for 10 include files ws2tcpip.h, ..., errno.h -- Looking for 10 include files ws2tcpip.h, ..., errno.h - found -- Looking for 12 include files ws2tcpip.h, ..., gssapi/gssapi.h -- Looking for 12 include files ws2tcpip.h, ..., gssapi/gssapi.h - not found -- Looking for 12 include files ws2tcpip.h, ..., gssapi/gssapi_generic.h -- Looking for 12 include files ws2tcpip.h, ..., gssapi/gssapi_generic.h - not f ound -- Looking for 12 include files ws2tcpip.h, ..., gssapi/gssapi_krb5.h -- Looking for 12 include files ws2tcpip.h, ..., gssapi/gssapi_krb5.h - not foun d -- Looking for 12 include files ws2tcpip.h, ..., idn-free.h -- Looking for 12 include files ws2tcpip.h, ..., idn-free.h - not found -- Looking for 12 include files ws2tcpip.h, ..., ifaddrs.h -- Looking for 12 include files ws2tcpip.h, ..., ifaddrs.h - not found -- Looking for 13 include files ws2tcpip.h, ..., krb.h -- Looking for 13 include files ws2tcpip.h, ..., krb.h - not found -- Looking for 13 include files ws2tcpip.h, ..., libgen.h -- Looking for 13 include files ws2tcpip.h, ..., libgen.h - not found -- Looking for 13 include files ws2tcpip.h, ..., libssh2.h -- Looking for 13 include files ws2tcpip.h, ..., libssh2.h - not found -- Looking for 13 include files ws2tcpip.h, ..., limits.h -- Looking for 13 include files ws2tcpip.h, ..., limits.h - found -- Looking for 14 include files ws2tcpip.h, ..., locale.h -- Looking for 14 include files ws2tcpip.h, ..., locale.h - found -- Looking for 15 include files ws2tcpip.h, ..., netinet/tcp.h -- Looking for 15 include files ws2tcpip.h, ..., netinet/tcp.h - not found -- Looking for 15 include files ws2tcpip.h, ..., pem.h -- Looking for 15 include files ws2tcpip.h, ..., pem.h - not found -- Looking for 15 include files ws2tcpip.h, ..., poll.h -- Looking for 15 include files ws2tcpip.h, ..., poll.h - not found -- Looking for 15 include files ws2tcpip.h, ..., rsa.h -- Looking for 15 include files ws2tcpip.h, ..., rsa.h - not found -- Looking for 17 include files ws2tcpip.h, ..., ssl.h -- Looking for 17 include files ws2tcpip.h, ..., ssl.h - not found -- Looking for 17 include files ws2tcpip.h, ..., stdbool.h -- Looking for 17 include files ws2tcpip.h, ..., stdbool.h - found -- Looking for 21 include files ws2tcpip.h, ..., stropts.h -- Looking for 21 include files ws2tcpip.h, ..., stropts.h - not found -- Looking for 22 include files ws2tcpip.h, ..., tld.h -- Looking for 22 include files ws2tcpip.h, ..., tld.h - not found -- Looking for 23 include files ws2tcpip.h, ..., stddef.h -- Looking for 23 include files ws2tcpip.h, ..., stddef.h - found -- Looking for 26 include files ws2tcpip.h, ..., ldap.h -- Looking for 26 include files ws2tcpip.h, ..., ldap.h - not found -- Looking for 26 include files ws2tcpip.h, ..., sys/utsname.h -- Looking for 26 include files ws2tcpip.h, ..., sys/utsname.h - not found -- Looking for 26 include files ws2tcpip.h, ..., idna.h -- Looking for 26 include files ws2tcpip.h, ..., idna.h - not found -- LDAP_H not found CURL_DISABLE_LDAP set ON -- LDAP needs to be enabled to support LDAPS -- 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 short -- Check size of short - 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 -- Looking for basename -- Looking for basename - not found -- Looking for strncmpi -- Looking for strncmpi - not found -- Looking for alarm -- Looking for alarm - not found -- Looking for CRYPTO_cleanup_all_ex_data -- Looking for CRYPTO_cleanup_all_ex_data - not found -- Looking for gethostbyname -- Looking for gethostbyname - found -- Looking for strtoll -- Looking for strtoll - found -- Looking for _strtoi64 -- Looking for _strtoi64 - found -- Looking for strerror_r -- Looking for strerror_r - not found -- Looking for siginterrupt -- Looking for siginterrupt - not found -- Looking for fork -- Looking for fork - not found -- Looking for freeaddrinfo -- Looking for freeaddrinfo - found -- Looking for freeifaddrs -- Looking for freeifaddrs - not found -- Looking for pipe -- Looking for pipe - not found -- Looking for ftruncate -- Looking for ftruncate - not found -- Looking for getprotobyname -- Looking for getprotobyname - found -- Looking for getrlimit -- Looking for getrlimit - not found -- Looking for idn_free -- Looking for idn_free - not found -- Looking for idna_strerror -- Looking for idna_strerror - not found -- Looking for tld_strerror -- Looking for tld_strerror - not found -- Looking for setlocale -- Looking for setlocale - found -- Looking for setrlimit -- Looking for setrlimit - not found -- Looking for fcntl -- Looking for fcntl - not found -- Looking for ioctl -- Looking for ioctl - not found -- Looking for setsockopt -- Looking for setsockopt - found -- Looking for inet_pton -- Looking for inet_pton - not found -- Performing Curl Test HAVE_FCNTL_O_NONBLOCK -- Performing Curl Test HAVE_FCNTL_O_NONBLOCK - Failed -- Performing Curl Test HAVE_IOCTLSOCKET -- Performing Curl Test HAVE_IOCTLSOCKET - Success -- Performing Curl Test HAVE_IOCTLSOCKET_CAMEL -- Performing Curl Test HAVE_IOCTLSOCKET_CAMEL - Failed -- Performing Curl Test HAVE_IOCTLSOCKET_CAMEL_FIONBIO -- Performing Curl Test HAVE_IOCTLSOCKET_CAMEL_FIONBIO - Success -- Performing Curl Test HAVE_IOCTLSOCKET_FIONBIO -- Performing Curl Test HAVE_IOCTLSOCKET_FIONBIO - Success -- Performing Curl Test HAVE_IOCTL_FIONBIO -- Performing Curl Test HAVE_IOCTL_FIONBIO - Failed -- Performing Curl Test HAVE_IOCTL_SIOCGIFADDR -- Performing Curl Test HAVE_IOCTL_SIOCGIFADDR - Failed -- Performing Curl Test HAVE_SETSOCKOPT_SO_NONBLOCK -- Performing Curl Test HAVE_SETSOCKOPT_SO_NONBLOCK - Failed -- Performing Curl Test HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID -- Performing Curl Test HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID - Failed -- Performing Curl Test HAVE_SOCKLEN_T -- Performing Curl Test HAVE_SOCKLEN_T - Success -- Performing Curl Test HAVE_BOOL_T -- Performing Curl Test HAVE_BOOL_T - Success -- Performing Curl Test HAVE_FILE_OFFSET_BITS -- Performing Curl Test HAVE_FILE_OFFSET_BITS - Failed -- Performing Curl Test HAVE_GLIBC_STRERROR_R -- Performing Curl Test HAVE_GLIBC_STRERROR_R - Failed -- Performing Curl Test HAVE_POSIX_STRERROR_R -- Performing Curl Test HAVE_POSIX_STRERROR_R - Failed -- Check size of curl_off_t -- Check size of curl_off_t - failed -- Check size of socklen_t -- Check size of socklen_t - done -- Performing Test curl_cv_recv -- Performing Test curl_cv_recv - Success -- Performing Test int recv(int, void *, size_t, int) (curl_cv_func_recv_test) -- Performing Test int recv(int, void *, size_t, int) (curl_cv_func_recv_test) - Success -- Performing Test curl_cv_send -- Performing Test curl_cv_send - Success -- Performing Test int send(int, const void *, size_t, int) (curl_cv_func_send_t est) -- Performing Test int send(int, const void *, size_t, int) (curl_cv_func_send_t est) - Success -- Performing Test HAVE_MSG_NOSIGNAL -- Performing Test HAVE_MSG_NOSIGNAL - Failed -- Performing Test HAVE_STRUCT_TIMEVAL -- Performing Test HAVE_STRUCT_TIMEVAL - Success -- Performing Test HAVE_POLL_FINE -- Performing Test HAVE_POLL_FINE - Failed -- Check size of sig_atomic_t -- Check size of sig_atomic_t - done -- Performing Test HAVE_SIG_ATOMIC_T_NOT_VOLATILE -- Performing Test HAVE_SIG_ATOMIC_T_NOT_VOLATILE - Success -- Check size of struct sockaddr_storage -- Check size of struct sockaddr_storage - failed CMake Warning (dev) at tests/CMakeLists.txt:1 (add_subdirectory): The source directory

C:/Users/jcoffey/main/extlibs/curl-7.35.0/tests/libtest

不包含一个CMakeLists.txt文件。

does not contain a CMakeLists.txt file.

CMake不支持这种情况,但它过去意外地工作
,并被允许兼容。

CMake does not support this case but it used to work accidentally and is being allowed for compatibility.

未设置策略CMP0014:输入目录必须具有
CMakeLists.txt。运行cmake --help-policy CMP0014了解策略
的详细信息。使用cmake_policy命令设置策略,
禁止此警告。此警告是为项目开发人员。

Policy CMP0014 is not set: Input directories must have CMakeLists.txt. Run "cmake --help-policy CMP0014" for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it.

在测试/ CMakeLists.txt中的CMake警告(dev):2(add_subdirectory):

源目录

CMake Warning (dev) at tests/CMakeLists.txt:2 (add_subdirectory):
The source directory

C:/Users/jcoffey/main/extlibs/curl-7.35.0/tests/server

不包含CMakeLists.txt文件。

does not contain a CMakeLists.txt file.

策略CMP0014未设置:输入目录必须具有
CMakeLists.txt。运行cmake --help-policy CMP0014了解策略
的详细信息。使用cmake_policy命令设置策略,
禁止此警告。此警告是为项目开发人员。使用
-Wno-dev禁止它。

CMake does not support this case but it used to work accidentally and is being allowed for compatibility.

- 配置完成
- 生成完成
- 写入:C:/Users/jcoffey/main/extlibs/curl-7.35.0-build

Policy CMP0014 is not set: Input directories must have CMakeLists.txt. Run "cmake --help-policy CMP0014" for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it.

步骤4:
在Visual Studio中,使用配置管理器将目标类型更改为x64(我必须选择一个新平台,并选择X64并从Win32复制设置)。这是一个非常直接的步骤,用于定位X64机器目标,以免混淆,我没有在这里包括一步一步的细节。

-- Configuring done -- Generating done -- Build files have been written to: C:/Users/jcoffey/main/extlibs/curl-7.35.0-build

步骤5
选择解决方案并从Visual Studio 2013中重建所有内容,然后会出现上述输出。

Step 4: Within Visual Studio change the target type to x64 using the configuration manager (where I had to select a new platform and I selected X64 and copied the settings from Win32). This is a pretty straight forward step that is used to target an X64 machine target, so as not to confuse, I have not included the step by step details here.

现在不需要SSL,很高兴知道如何告诉CMake LIBSSL的位置在哪里(我下载了一套预构建的库(32和64位,包括SSL和其他库)从 http://www.confusedbycode.com/curl/ ,但这些是发布模式,我需要能够调试libCurl看到发生了什么是我遇到的一些奇怪的问题我是一个新手,当谈到配置CMake,但它看起来是一个真正有前途的工具,我们的目标多个平台,但更喜欢开发

Step 5 Select the solution and rebuild all from Visual Studio 2013 and the output above will ensue.


推荐答案

看起来CMake生成的解决方案文件没有期望X64作为潜在目标。我在这里发现了一个小问题。

It looks like the CMake generated solution file was not expecting X64 as a potential target. I found a slight variant on the problem here.

enter link description here

这是X64命令行选项的一个图片 - 你可以看到我改变配置管理器使用X64之后

This is a pic of the X64 Command Line Options - as you can see after I changed the configuration manager to use X64 the

进行这些更改后,项目终于链接,我能够生成库的调试版本。

After making these changes the project finally linked and I was able to generate a debug version of the library.

这篇关于libCurl x64构建问题Visual Studio 2013(x64)Visual Studio& CMake的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆