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

查看:17

问题描述

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

基本错误输出(为简洁起见进行了修剪)如下

<块引用>

1>------ 构建开始:项目:ZERO_CHECK,配置:调试 x64

...

2>C:Usersjcoffeymainextlibscurl-7.35.0libsmtp.c(2174): 警告C4267:+=":从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> 非 ascii.c 2> asyn-ares.c2> asyn-thread.c 2> curl_gssapi.c 2> curl_ntlm.c 2> curl_ntlm_wb.c2> 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.c2> 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>x64Debugfile.obj : 致命错误 LNK1112: 模块机器类型x64"与目标机器类型X86"冲突 3>------构建开始:项目:curl,配置:调试 x64 ------ 3>构建自定义规则C:/Users/jcoffey/main/extlibs/curl-7.35.0/src/CMakeLists.txt

请帮忙 - 我在论坛和 stackoverflow 上搜索过类似的东西,但无济于事.我能够在 x86 (win32) 模式下成功构建,但是当我以 x64 为目标时出现链接错误.

第 1 步:下载最新的 CMake 2.8.12.2 &更新 Windows PATH 环境(在我的情况下,我使用的是 MMINGW32 bash shell 提示符,但如果我使用本机 Visual Studio 2013 x64 shell 运行 cmake,我会遇到完全相同的链接问题)><块引用>

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

验证windows上Cmake的路径和版本

<块引用>

$ cmake --version cmake 版本 2.8.12.2

第 2 步:将 curl-7.35.0 提取到文件夹 c: empcurl-7.35.0" 并创建一个并行文件夹 "c: empcurl-7.35.0uild".

第 3 步:切换到 build 文件夹并运行 Cmake,目标是Visual Studio 12"作为要创建的所需 Visual Studio 解决方案/项目组合

<块引用>

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

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

<块引用>

$ cmake -G "Visual Studio 12" ../curl-7.35.0-- C 编译器标识为 MSVC 18.0.21005.1-- 检查工作的 C 编译器使用:Visual Studio 12-- 检查工作的 C 编译器使用:Visual Studio 12 -- 有效-- 检测 C 编译器 ABI 信息-- 检测 C 编译器 ABI 信息 - 在 CMakeLists.txt:47 处完成 CMake 警告(消息):curl cmake 构建系统很差保持.注意

-- curl 版本=[7.35.0]-- 在 ws2_32 中寻找 getch;-- 在 ws2_32 中寻找 getch;- 成立-- 在 winmm 中寻找 getch;ws2_32-- 在 winmm 中寻找 getch;ws2_32 - 找到-- 在 wldap32 中寻找 cldap_open-- 在 wldap32 中寻找 cldap_open - 找到-- 在 idn;winmm;ws2_32 中寻找 idna_to_ascii_lz-- 在 idn;winmm;ws2_32 中寻找 idna_to_ascii_lz - 未找到-- 在 ldap;winmm;ws2_32 中寻找 ldap_init-- 在 ldap;winmm;ws2_32 中寻找 ldap_init - 未找到-- 找不到 OpenSSL,尝试在系统变量 OPENSSL_ROOT_DIR 中设置 OpenSSL 根文件夹的路径(缺少:OPENSSL_LIBRARIESOPENSSL_INCLUDE_DIR)

-- 寻找包含文件 ws2tcpip.h-- 寻找包含文件 ws2tcpip.h - 找到-- 寻找包含文件 ws2tcpip.h, winsock2.h-- 寻找包含文件 ws2tcpip.h, winsock2.h - 找到-- 寻找 3 个包含文件 ws2tcpip.h, ..., stdio.h-- 寻找 3 个包含文件 ws2tcpip.h, ..., stdio.h - 找到-- 寻找 4 个包含文件 ws2tcpip.h, ..., windows.h-- 寻找 4 个包含文件 ws2tcpip.h, ..., windows.h - 找到-- 寻找 5 个包含文件 ws2tcpip.h, ..., winsock.h-- 寻找 5 个包含文件 ws2tcpip.h, ..., winsock.h - 找到-- 寻找 6 个包含文件 ws2tcpip.h, ..., sys/filio.h-- 寻找 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 - 找到-- 寻找 10 个包含文件 ws2tcpip.h, ..., crypto.h-- 寻找 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 - 找到-- 寻找 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 - 未找到-- 寻找 12 个包含文件 ws2tcpip.h, ..., gssapi/gssapi_krb5.h-- 寻找 12 个包含文件 ws2tcpip.h, ..., gssapi/gssapi_krb5.h - 未找到-- 寻找 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 - 未找到-- 寻找 13 个包含文件 ws2tcpip.h, ..., libgen.h-- 寻找 13 个包含文件 ws2tcpip.h, ..., libgen.h - 未找到-- 寻找 13 个包含文件 ws2tcpip.h, ..., libssh2.h-- 寻找 13 个包含文件 ws2tcpip.h, ..., libssh2.h - 未找到-- 寻找 13 个包含文件 ws2tcpip.h, ...,limits.h-- 寻找 13 个包含文件 ws2tcpip.h, ...,limits.h - 找到-- 寻找 14 个包含文件 ws2tcpip.h, ..., locale.h-- 寻找 14 个包含文件 ws2tcpip.h, ..., locale.h - 找到-- 寻找 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 - 找到-- 寻找 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 - 找到-- 寻找 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 的大小 - 完成-- 检查 ssize_t 的大小-- 检查 ssize_t 的大小 - 失败-- 检查长长的大小-- 检查长长的大小 - 完成-- 检查长的大小-- 检查 long-done 的大小-- 检查短的尺寸-- 检查short-done的大小-- 检查 int 的大小-- 检查 int 的大小 - 完成-- 检查 __int64 的大小-- 检查 __int64 的大小 - 完成-- 检查 time_t 的大小-- 检查 time_t 的大小 - 完成-- 寻找基名-- 寻找基本名称 - 未找到-- 寻找 strncmpi-- 寻找 strncmpi - 未找到-- 寻找闹钟-- 寻找闹钟 - 未找到-- 寻找 CRYPTO_cleanup_all_ex_data-- 寻找 CRYPTO_cleanup_all_ex_data - 未找到-- 寻找 gethostbyname-- 寻找 gethostbyname - 找到-- 寻找 strtoll-- 寻找 strtoll - 找到-- 寻找 _strtoi64-- 寻找 _strtoi64 - 找到-- 寻找 strerror_r-- 寻找 strerror_r - 未找到-- 寻找 siginterrupt-- 寻找 siginterrupt - 未找到-- 找叉子-- 寻找叉子 - 未找到-- 寻找 freeaddrinfo-- 寻找 freeaddrinfo - 找到-- 寻找freeifaddrs-- 寻找 freeifaddrs - 未找到-- 找管子-- 寻找管道 - 未找到-- 寻找 ftruncate-- 寻找 ftruncate - 未找到-- 寻找 getprotobyname-- 寻找 getprotobyname - 找到-- 寻找 getrlimit-- 寻找 getrlimit - 未找到-- 寻找 idn_free-- 寻找 idn_free - 未找到-- 寻找 idna_strerror-- 寻找 idna_strerror - 未找到-- 寻找 tld_strerror-- 寻找 tld_strerror - 未找到-- 寻找 setlocale-- 寻找 setlocale - 找到-- 寻找 setrlimit-- 寻找 setrlimit - 未找到-- 寻找 fcntl-- 寻找 fcntl - 未找到-- 寻找ioctl-- 正在寻找 ioctl - 未找到-- 寻找 setockopt-- 寻找setsockopt - 找到-- 寻找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 的大小 - 完成-- 执行测试 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) - 成功-- 执行测试 curl_cv_send-- 执行测试 curl_cv_send - 成功-- 执行测试 int send(int, const void *, size_t, int) (curl_cv_func_send_test)-- 执行测试 int send(int, const void *, size_t, int) (curl_cv_func_send_test) - 成功-- 执行测试 HAVE_MSG_NOSIGNAL-- 执行测试 HAVE_MSG_NOSIGNAL - 失败-- 执行测试 HAVE_STRUCT_TIMEVAL-- 执行测试 HAVE_STRUCT_TIMEVAL - 成功-- 执行测试 HAVE_POLL_FINE-- 执行测试 HAVE_POLL_FINE - 失败-- 检查 sig_atomic_t 的大小-- 检查 sig_atomic_t 的大小 - 完成-- 执行测试 HAVE_SIG_ATOMIC_T_NOT_VOLATILE-- 执行测试 HAVE_SIG_ATOMIC_T_NOT_VOLATILE - 成功-- 检查 struct sockaddr_storage 的大小-- 检查 struct sockaddr_storage 的大小 - 在 tests/CMakeLists.txt:1 (add_subdirectory): 源目录中出现失败的 CMake 警告(dev)

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

不包含 CMakeLists.txt 文件.

CMake 不支持这种情况,但它曾经意外地工作并允许兼容性.

未设置策略 CMP0014:输入目录必须具有CMakeLists.txt.为策略运行cmake --help-policy CMP0014"细节.使用 cmake_policy 命令设置策略和取消此警告.此警告适用于项目开发人员.用-Wno-dev 来抑制它.

tests/CMakeLists.txt:2 (add_subdirectory) 中的 CMake 警告 (dev):
源码目录

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

不包含 CMakeLists.txt 文件.

CMake 不支持这种情况,但它曾经意外地工作并允许兼容性.

未设置策略 CMP0014:输入目录必须具有CMakeLists.txt.为策略运行cmake --help-policy CMP0014"细节.使用 cmake_policy 命令设置策略和取消此警告.此警告适用于项目开发人员.用-Wno-dev 来抑制它.

-- 配置完成-- 生成完成-- 构建文件已写入:C:/Users/jcoffey/main/extlibs/curl-7.35.0-build

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

步骤 5选择解决方案并从 Visual Studio 2013 中全部重建,然后将出现上面的输出.

旁注:虽然我现在并不真正需要 SSL,但很高兴知道如何告诉 CMake LIBSSL 事物所在的位置(我下载了一个预先构建的库包(32 和 64位包括 SSL 和其他库)来自 http://www.confusedbycode.com/curl/,但是这些是发布模式,我需要能够调试 libCurl 以查看我遇到的一些奇怪问题发生了什么.在配置 CMake 时,我是一个新手,但它看起来是一个非常有前途的工具面向多平台但更喜欢在windows上开发的我们.肯定比gnu autotools容易.

解决方案

看起来 CMake 生成的解决方案文件并未将 X64 作为潜在目标.我发现这里的问题略有不同.

在此处输入链接描述

这是 X64 命令行选项的图片 - 正如您在我将配置管理器更改为使用 X64 后所看到的

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

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

...

2>C:Usersjcoffeymainextlibscurl-7.35.0libsmtp.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>x64Debugfile.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

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.

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

verify that the path and version of Cmake on windows

$ cmake --version cmake version 2.8.12.2

Step 2: extract curl-7.35.0 into a folder c: empcurl-7.35.0" and make a parallel folder "c: empcurl-7.35.0uild".

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 -G "Visual Studio 12" ../curl-7.35.0

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

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

does not contain a CMakeLists.txt file.

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

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.

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

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

does not contain a CMakeLists.txt file.

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

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.

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

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.

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

Side note: Although I do not really need SSL for now, it would be nice to know how to tell CMake where the location of the LIBSSL things are located (I downloaded a package of pre-built libraries (both 32 and 64 bit including the SSL and other libraries) from http://www.confusedbycode.com/curl/, however these are release mode and I need to be able to debug libCurl to see what is going on with some strange problems I am encountering. I am a newbie when it comes to configuring CMake however it looks to be a really promising tool for those of us that target multiple platforms but prefer to develop on windows. It certainly is easier than the gnu autotools.

解决方案

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

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.

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