- 安装perl: Strawberry
- 打开VS 窗口:x64 Native Tools Command Prompt for VS 2017
- set PATH=C:\Strawberry\perl\bin;%PATH%
- cd net-snmp-5.9.1\win32
- perl Configure --prefix=c:/snmp --config=release --linktype=static
- nmake
- 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")
然后:
- perl Configure --prefix=c:/snmp --config=release --linktype=static \
--with-ssl --with-sslincdir=c:/openssl/include --with-ssllibdir=c:/openssl/lib
网友评论