美文网首页
Windows 10编译net-snmp-5.9.1

Windows 10编译net-snmp-5.9.1

作者: CodingCode | 来源:发表于2023-01-12 03:36 被阅读0次
  1. 安装perl: Strawberry
  2. 打开VS 窗口:x64 Native Tools Command Prompt for VS 2017
  3. set PATH=C:\Strawberry\perl\bin;%PATH%
  4. cd net-snmp-5.9.1\win32
  5. perl Configure --prefix=c:/snmp --config=release --linktype=static
  6. nmake
  7. nmake install

如果需要enable SSL
在第5步之前,检查net-snmp-5.9.1\win32\net-snmp\net-snmp-config.h.in针对libcrypto.lib和libssl.lib的库名字,例如:

net-snmp-5.9.1\win32\net-snmp>diff net-snmp-config.h.in.old net-snmp-config.h.in
1798,1799c1798,1799
< #            pragma comment(lib, "libcrypto64MD.lib")
< #            pragma comment(lib, "libssl64MD.lib")
---
> #            pragma comment(lib, "libcrypto.lib")
> #            pragma comment(lib, "libssl.lib")

然后:

  1. perl Configure --prefix=c:/snmp --config=release --linktype=static \
    --with-ssl --with-sslincdir=c:/openssl/include --with-ssllibdir=c:/openssl/lib

相关文章

网友评论

      本文标题:Windows 10编译net-snmp-5.9.1

      本文链接:https://www.haomeiwen.com/subject/sfiicdtx.html