SNMP子代理开发

时间:2010-10-05 10:22:27

标签: windows visual-studio-2005 snmp

我是Net-SNMP的新手,我想在Windows上使用Net-SNMP实现Subagent,它将提供有关我的服务器统计信息的信息,如处理的呼叫,呼叫失败等。 我按照提供的方式进行了Net-SNMP安装 http://forums.cacti.net/viewtopic.php?f=6&t=26151 并尝试编译Net-SNMP上给出的示例 http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_Subagent

我在VS2005下创建了一个新项目,并使用了上述URL中的代码,并提供了include和lib路径,并提供了所需的库。

编译时我会发现链接错误,请帮我摆脱这些错误。

1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>SNMPFirst.obj : error LNK2019: unresolved external symbol _snmp_enable_calllog referenced in function _wmain
1>netsnmpmibs.lib(master_admin.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmpmibs.lib(subagent.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmpmibs.lib(agentx_config.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmpmibs.lib(client.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmpmibs.lib(protocol.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmpmibs.lib(master.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmpmibs.lib(vacm_conf.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmpmibs.lib(iquery.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmpmibs.lib(usmConf.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmphelpers.lib(cache_handler.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmphelpers.lib(stash_to_next.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmphelpers.lib(table_data.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmphelpers.lib(table.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmphelpers.lib(stash_cache.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmphelpers.lib(table_dataset.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmphelpers.lib(debug_handler.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmphelpers.lib(scalar.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmphelpers.lib(null.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmphelpers.lib(watcher.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmphelpers.lib(serialize.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmphelpers.lib(read_only.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmphelpers.lib(instance.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmphelpers.lib(all_helpers.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmphelpers.lib(bulk_to_next.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmphelpers.lib(old_api.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmpagent.lib(agent_trap.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmpagent.lib(agent_sysORTable.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmpagent.lib(agent_read_config.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmpagent.lib(agent_index.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmpagent.lib(snmp_agent.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmpagent.lib(snmp_vars.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmpagent.lib(agent_handler.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmpagent.lib(agent_registry.obj) : error LNK2001: unresolved external symbol __forceCRTManifestCUR
1>netsnmpagent.lib(snmp_agent.obj) : error LNK2019: unresolved external symbol _select@20 referenced in function _agent_check_and_process
1>netsnmpmibs.lib(protocol.obj) : error LNK2019: unresolved external symbol _ntohl@4 referenced in function _agentx_realloc_build_int
1>netsnmpmibs.lib(protocol.obj) : error LNK2019: unresolved external symbol _ntohs@4 referenced in function _agentx_realloc_build_short
1>netsnmpmibs.lib(protocol.obj) : error LNK2019: unresolved external symbol _htonl@4 referenced in function _agentx_realloc_build_double
1>D:\Kirusa\working\SNMPFirst\Debug\SNMPFirst.exe : fatal error LNK1120: 6 unresolved externals