windows - 如何为 Windows 编译 liboauth

标签 windows

有人成功编译liboauth适用于 Windows?

非常感谢这里的任何帮助。

最佳答案

您至少需要 0.9.3 才能像您尝试的那样进行编译。

version 0.9.3
 - yet more build-system fixes:
   - allow to override HASH_LIBS and CURL_LIBS using envoronment variables
   - include them in .pc and tests/Makefile.am

我使用以下步骤使其工作:

为此你需要安装 MSYS/MINGW

  1. 转到:http://www.gknw.de/mirror/curl/win32/
  2. 下载当前的 curl-x.xx.x-ssl-sspi-zlib-static-bin-w32.zip
  3. 打开 zip 文件读取 built.txt 并找出使用的是哪个版本的 OpenSSL。
  4. 提取 libcurl.dll、libeay32.dll 和 libssl32.dll 并安装在 mingw/bin目录
  5. 转到 CURL 主页并下载匹配的 curl-x.xx.x.zip 文件。
  6. 打开 zip 文件并将 include/curl 目录移动到/mingw 以便 它位于 mingw/include/curl
  7. 转到 OpenSSL 主页并下载匹配的 openssl-x.x.xy.tar.gz 文件。
  8. 打开tar.gz 并将include/openssl 目录移动到/mingw
  9. 转到 http://liboauth.sourceforge.net/并下载当前版本 (至少获得 0.9.3)
  10. 从 msys shell,运行:

    env PKG_CONFIG=/bin/true ./configure --disable-static --disable-curl \
    CURL_LIBS=/mingw/bin/libcurl.dll HASH_LIBS="/mingw/bin/libeay32.dll \
    /mingw/bin/libssl32.dll" --prefix=/mingw
    
  11. 然后:

    mingw32-make && mingw32-make check
    
  12. 祝你好运,一切都按预期进行编译。

    mingw32-make install
    

关于windows - 如何为 Windows 编译 liboauth,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3913287/

相关文章:

windows - 从通用 Windows 应用程序的后台任务中打开 uri

c++ - 单例执行顺序

java - 如何清理由 Runtime.exec() 启动的进程?

windows - 用于 Bootstrap 文件下载的 AWS CloudFormation 和 Windows Server 2008 R2

linux - Maven 日期格式不正确

c++ - Windows 上的 DLL Main 对比。 __attribute__((constructor)) Linux 上的入口点

windows - 如何在 Windows 上使用 x86 perl 系统启动 x64 shell

python - Python 3 和 Windows 7 的定时输入

c++ - 确定系统队列中下一个 UDP 数据报的大小

c++ - 在 Windows C++ 应用程序中获取主线程的控制