From: srenivasan rs <ssr...@gm...> - 2008-06-13 07:33:45
|
Hi All, I am trying to create a DLL for nstAgentPluginObject sample program given in http://www.net-snmp.org/tutorial/tutorial-5/toolkit/dlmod/nstAgentPluginObject.c using VC++ 2008 Express Edition. ====================================================================== The compilation and linker settings are as follows Compiler -> All options /O2 /Oi /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_USRDLL" /D "_WINDLL" /D "_UNICODE" /D "UNICODE" /FD /EHsc /MD /Gy /Fo"Release\\" /Fd"Release\vc90.pdb" /W3 /nologo /c /Zi /Gd /TC /errorReport:prompt Compiler -> Additional options : None Linker -> All Options /OUT:"C:\afiles\vs2008\Projects\Project1\nstAgentPluginObject\Release\nstAgentPluginObject.dll" /INCREMENTAL:NO /NOLOGO /DLL /MANIFEST /MANIFESTFILE:"Release\nstAgentPluginObject.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /LTCG /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /ERRORREPORT:PROMPT kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Linker -> Additional options /VERBOSE:LIB msvcrt.lib netsnmphelpers.lib netsnmp.lib netsnmpagent.lib ================================================================================== The compilation goes through fine but, the linking failed with unresolved external symbol. I have attached the output below. 1>------ Rebuild All started: Project: nstAgentPluginObject, Configuration: Release Win32 ------ 1>Deleting intermediate and output files for project 'nstAgentPluginObject', configuration 'Release|Win32' 1>Compiling... 1>nstAgentPluginObject.c 1>Linking... 1>Searching libraries 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\msvcrt.lib: 1> Searching C:\usr\lib\netsnmphelpers.lib: 1> Searching C:\usr\lib\netsnmp.lib: 1> Searching C:\usr\lib\netsnmpagent.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\kernel32.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\user32.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\gdi32.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\winspool.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\comdlg32.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\advapi32.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\shell32.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\ole32.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\oleaut32.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\uuid.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbc32.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbccp32.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\OLDNAMES.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\msvcrt.lib: 1> Searching C:\usr\lib\netsnmphelpers.lib: 1> Searching C:\usr\lib\netsnmp.lib: 1> Searching C:\usr\lib\netsnmpagent.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\kernel32.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\user32.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\gdi32.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\winspool.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\comdlg32.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\advapi32.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\shell32.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\ole32.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\oleaut32.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\uuid.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbc32.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\odbccp32.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\OLDNAMES.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\msvcrt.lib: 1> Searching C:\usr\lib\netsnmphelpers.lib: 1>Finished searching libraries 1>netsnmpagent.lib(snmp_agent.obj) : error LNK2001: unresolved external symbol _select@20 1>netsnmpagent.lib(snmp_agent.obj) : error LNK2001: unresolved external symbol _real_init_master 1>netsnmpagent.lib(agent_read_config.obj) : error LNK2001: unresolved external symbol _vacm_standard_views 1>netsnmpagent.lib(snmp_vars.obj) : error LNK2001: unresolved external symbol _init_vacm_conf 1>netsnmpagent.lib(snmp_vars.obj) : error LNK2001: unresolved external symbol _init_iquery 1>netsnmpagent.lib(snmp_vars.obj) : error LNK2001: unresolved external symbol _init_usmConf 1>netsnmpagent.lib(snmp_vars.obj) : error LNK2001: unresolved external symbol _subagent_init 1>netsnmpagent.lib(snmp_vars.obj) : error LNK2001: unresolved external symbol _agentx_config_init 1>netsnmpagent.lib(agent_index.obj) : error LNK2001: unresolved external symbol _agentx_register_index 1>netsnmpagent.lib(agent_index.obj) : error LNK2001: unresolved external symbol _agentx_unregister_index 1>C:\afiles\vs2008\Projects\Project1\nstAgentPluginObject\Release\nstAgentPluginObject.dll : fatal error LNK1120: 10 unresolved externals 1>Build log was saved at "file://c:\visual studio 2008\Projects\Project1\nstAgentPluginObject\nstAgentPluginObject\Release\BuildLog.htm" 1>nstAgentPluginObject - 11 error(s), 0 warning(s) ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ========== Can any of you let me know what mistake am I doing here? Thanks, R Srinivasan |