windows使用net-snmp
2015-01-21 19:18
253 查看
安装mingw,mingw-get-inst-20120426.exe直接安装即可。完成后还可以设置环境变量:我的电脑,属性,系统保护,高级,环境变量,新建变量:变量MINGW_HOME=值C:\MinGW,path添加;%MINGW_HOME%\bin;使得该目录下的命令windows能找到。
完成以后打开mingw shell。跟linux一样了。
PREFIX=c:/usr
./configure --prefix=$PREFIX --enable-mini-agent --enable-shared=no --disable-embedded-perl --disable-perl-cc-checks --without-perl-modules --disable-manuals --disable-ipv6 -enable-mfd-rewrites --with-sys-contact="xxx" --with-logfile="$PREFIX/log/snmpd.log"
--with-persistent-directory="$PREFIX/etc/net-snmp" --with-default-snmp-version="3" --with-sys-location="location" --with-mibdirs="$PREFIX/share/snmp/mibs" --with-mib-modules="actiontec-snmp"
make
make install
编译还是有点慢,完成后在目录c:\usr下面生成执行文件,以windows执行的。但是我们的mibs可以再linux环境下生成,而生成的代码需要使用windows库函数了,还不用指定库文件。因为使用的是win32编译的。:
/bin/sh ../../libtool --mode=compile gcc -I../../include -I. -I../../agent -I../../agent/mibgroup -I../../snmplib -fno-strict-aliasing -g -O2 -Umingw32 -Dmingw32=mingw32 -c -o actiontec-snmp/pdmAudio.lo actiontec-snmp/pdmAudio.c
libtool: compile: gcc -I../../include -I. -I../../agent -I../../agent/mibgroup -I../../snmplib -fno-strict-aliasing -g -O2 -Umingw32 -Dmingw32=mingw32 -c actiontec-snmp/pdmAudio.c -o actiontec-snmp/pdmAudio.o
完成以后打开mingw shell。跟linux一样了。
PREFIX=c:/usr
./configure --prefix=$PREFIX --enable-mini-agent --enable-shared=no --disable-embedded-perl --disable-perl-cc-checks --without-perl-modules --disable-manuals --disable-ipv6 -enable-mfd-rewrites --with-sys-contact="xxx" --with-logfile="$PREFIX/log/snmpd.log"
--with-persistent-directory="$PREFIX/etc/net-snmp" --with-default-snmp-version="3" --with-sys-location="location" --with-mibdirs="$PREFIX/share/snmp/mibs" --with-mib-modules="actiontec-snmp"
make
make install
编译还是有点慢,完成后在目录c:\usr下面生成执行文件,以windows执行的。但是我们的mibs可以再linux环境下生成,而生成的代码需要使用windows库函数了,还不用指定库文件。因为使用的是win32编译的。:
/bin/sh ../../libtool --mode=compile gcc -I../../include -I. -I../../agent -I../../agent/mibgroup -I../../snmplib -fno-strict-aliasing -g -O2 -Umingw32 -Dmingw32=mingw32 -c -o actiontec-snmp/pdmAudio.lo actiontec-snmp/pdmAudio.c
libtool: compile: gcc -I../../include -I. -I../../agent -I../../agent/mibgroup -I../../snmplib -fno-strict-aliasing -g -O2 -Umingw32 -Dmingw32=mingw32 -c actiontec-snmp/pdmAudio.c -o actiontec-snmp/pdmAudio.o
相关文章推荐
- windows下使用net-snmp实现agent扩展(一)
- windows下使用net-snmp实现agent扩展(二)
- windows下使用net-snmp实现agent扩展(一)
- windows下使用net-snmp实现agent扩展(二)
- windows下使用net-snmp实现agent扩展(三)
- windows下使用net-snmp实现agent扩展(一)
- windows下使用net-snmp实现agent扩展(三)
- windows下使用net-snmp实现agent扩展(四)
- windows下使用net-snmp实现agent扩展(四)
- Windows下使用net-snmp-5.4.1扩展代理所遇问题及解决
- windows下使用net-snmp实现agent扩展(四)
- windows下使用net-snmp实现agent扩展(二)
- Windows命令:Net使用详解
- 在64位Windows中使用64位版本ASP.NET 2.0的问题
- 如何使用 Visual C# .NET 对 DataGrid Windows 控件执行分页
- 使用 Visual C# .NET 检查 Windows 版本
- Windows SharePoint Services 虚拟服务器没被配置为与 ASP.NET 2.0.50727.42 一起使用-解决办法
- xml数据岛,xsl,javascript,asp.net 的结合使用 web 程序模仿 windows 资源管理器
- 如何使用Vb.net来修改Windows窗体非客户区
- 在ASP.NET中使用WINDOWS验证方式连接SQL SERVER数据库