1


我正在尝试构建同时支持 zlib、ssh2 和 openssl 的 curl dll 库

但是,当我指定release-dll-ssl-dll-ssh2-dll-zlib-dll

我得到这个列表:

Usage: nmake /f makefile.vc9 CFG=<config> <target>
where <config> is one of:
release                      - release static library
release-ssl                  - release static library with ssl
release-zlib                 - release static library with zlib
release-ssl-zlib             - release static library with ssl and zlib
release-ssl-ssh2-zlib        - release static library with ssl, ssh2 and zlib
release-ssl-dll              - release static library with dynamic ssl
release-zlib-dll             - release static library with dynamic zlib
release-ssl-dll-zlib-dll     - release static library with dynamic ssl and dynamic zlib
release-dll                  - release dynamic library
release-dll-ssl-dll          - release dynamic library with dynamic ssl
release-dll-zlib-dll         - release dynamic library with dynamic zlib
release-dll-ssl-dll-zlib-dll - release dynamic library with dynamic ssl and dynamic zlib
debug                        - debug static library
debug-ssl                    - debug static library with ssl
debug-zlib                   - debug static library with zlib
debug-ssl-zlib               - debug static library with ssl and zlib
debug-ssl-ssh2-zlib          - debug static library with ssl, ssh2 and zlib
debug-ssl-dll                - debug static library with dynamic ssl
debug-zlib-dll               - debug static library with dynamic zlib
debug-ssl-dll-zlib-dll       - debug static library with dynamic ssl and dynamic zlib
debug-dll                    - debug dynamic library
debug-dll-ssl-dll            - debug dynamic library with dynamic ssl
debug-dll-zlib-dll           - debug dynamic library with dynamic zlib1
debug-dll-ssl-dll-zlib-dll   - debug dynamic library with dynamic ssl and dynamic zlib
<target> can be left blank in which case all is assumed
Makefile.vc9(476) : fatal error U1050: please choose a valid configuration "release-dll-ssl-dll-zlib-dll-ssh2-dll"

构建release-ssl-dll-zlib-dll工作正常,但我也需要 sftp。

为什么这个选项不存在?
有没有解决的办法?

4

2 回答 2

1

答案是:你不能

  1. 你应该做的是在内部使用 .ssl、ssh2 和 zlib 构建 curl CFG=release-ssl-ssh2-zlib
  2. 然后使用此补丁将 dll 添加到链接命令中。请注意,此补丁适用于 VC10,但可以在 vc9 makefile 上轻松完成。
  3. 在构建之后,如果您想针对它构建一些东西(比如 PHP),您需要将 libssh2.lib 添加到 lincurl.lib。这可以用这个命令来完成(设置你的 libssh2.lib 和 libcurl.lib 的路径):

    lib.exe /OUT:libcurl_merged.lib libssh2.lib libcurl.lib
    copy libcurl_merged.lib libcurl.lib
    
于 2014-10-23T13:28:32.390 回答
0

您可以使用“winbuild”文件夹中的非标准构建脚本“Makefile.vc”。

x64 动态库的示例:

cd curl-src\winbuild
nmake /f Makefile.vc mode=dll VC=14 MACHINE=x64 DEBUG=no GEN_PDB=yes  WITH_SSL=dll WITH_ZLIB=dll WITH_SSH2=dll

构建将位于顶部 curl-src 目录 builds\ 目录中,该目录使用提供给 nmake 调用的选项命名。

于 2015-10-15T10:20:45.830 回答