title: LNK2001 VS2012 Net-SNMP
body: <p>I'm at the end of my rope with this linker error.  I've been searching the web and picking brains for days, but am at a total loss.  I installed, through the downloadable binaries, Net-SNMP (net-snmp-5.5.0-2.x64.exe) for Windows and tried running an example program.  The compile step indicates no errors, but I am getting a load of LNK2001: unresolved external symbol errors.  This would indicate that I haven't properly linked the libraries, but I <em>feel</em> like I have an am now hoping someone sees where I went wrong.  I'm sure it's something small, but I just can't find it.</p>
  
  <p>Thank you so much for the help; you have no clue what kind of weight this takes off of my shoulders.</p>
  
  <p>Additional Include Directories: C:\net-snmp\include</p>
  
  <p>Additional Library Directories: C:\net-snmp\lib; C:\net-snmp\bin</p>
  
  <p>Additional Dependencies: netsnmp.lib netsnmpagent.lib netsnmphelpers.lib netsnmpmibs.lib netsnmptrapd.lib (I've tried just including netsnmp.lib as that's all I should need, but am taking the shotgun approach at the moment)</p>
  
  <p>NOTE: Net-SNMP is installed to C:\net-snmp and using the built in Net-SNMP utilities through the command line works flawlessly.</p>
  
  <p>Source:</p>
  
  <pre><code>#include &lt;net-snmp/net-snmp-config.h&gt;
  #include &lt;net-snmp/net-snmp-includes.h&gt;
  #include &lt;string.h&gt;
  
  int main(int argc, char ** argv)
  {
      struct snmp_session session;
      struct snmp_session *sess_handle;
      struct snmp_pdu *pdu;
      struct snmp_pdu *response;
      struct variable_list *vars;
  
      oid id_oid[MAX_OID_LEN];
      oid serial_oid[MAX_OID_LEN];
      size_t id_len = MAX_OID_LEN;
      size_t serial_len = MAX_OID_LEN;
  
      int status;
      struct tree * mib_tree;
  
      /*********************/
      if(argv[1] == NULL){
          printf("Please supply a hostname\n");
          exit(1);
      }
  
      init_snmp("Den Dolphin 2 Check");
      snmp_sess_init( &amp;session );
  
      session.version = SNMP_VERSION_1;
      session.community = (u_char*) "public";
      session.community_len = strlen((const char *)session.community);
      session.peername = argv[1]; //172.20.2.103 - Den Dolphin 2
  
      sess_handle = snmp_open(&amp;session);
      add_mibdir(".");
      mib_tree = read_mib("xiden.txt");
      pdu = snmp_pdu_create(SNMP_MSG_GET);
  
      read_objid("PowerNet-MIB::upsBasicIdentModel.0", id_oid, &amp;id_len);
      snmp_add_null_var(pdu, id_oid, id_len);
      read_objid("PowerNet-MIB::upsAdvIdentSerialNumber.0", serial_oid, &amp;serial_len);
  
      snmp_add_null_var(pdu, serial_oid, serial_len);
      status = snmp_synch_response(sess_handle, pdu, &amp;response);
  
      for(vars = response-&gt;variables; vars; vars = vars-&gt;next_variable)
          print_value(vars-&gt;name, vars-&gt;name_length, vars);
  
      snmp_free_pdu(response);
      snmp_close(sess_handle);
      return (0);
  }
  </code></pre>
  
  <p>Linker Errors:</p>
  
  <pre><code>    Error   1   error LNK2001: unresolved external symbol _snmp_add_null_var    W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\snmp_test.obj snmp_test
      Error   2   error LNK2001: unresolved external symbol _add_mibdir   W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\snmp_test.obj snmp_test
      Error   3   error LNK2001: unresolved external symbol _snmp_synch_response  W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\snmp_test.obj snmp_test
      Error   4   error LNK2001: unresolved external symbol _snmp_sess_init   W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\snmp_test.obj snmp_test
      Error   5   error LNK2001: unresolved external symbol _snmp_pdu_create  W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\snmp_test.obj snmp_test
      Error   6   error LNK2001: unresolved external symbol _snmp_close   W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\snmp_test.obj snmp_test
      Error   7   error LNK2001: unresolved external symbol _read_objid   W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\snmp_test.obj snmp_test
      Error   8   error LNK2001: unresolved external symbol _init_snmp    W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\snmp_test.obj snmp_test
      Error   9   error LNK2001: unresolved external symbol _print_value  W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\snmp_test.obj snmp_test
      Error   10  error LNK2001: unresolved external symbol _snmp_free_pdu    W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\snmp_test.obj snmp_test
      Error   11  error LNK2001: unresolved external symbol _read_mib W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\snmp_test.obj snmp_test
      Error   12  error LNK2001: unresolved external symbol _snmp_open    W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\snmp_test.obj snmp_test
      Error   13  error LNK1120: 12 unresolved externals  W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\Release\snmp_test.exe snmp_test
  
  
  
  
  Build Output:
  
  1&gt;------ Build started: Project: snmp_test, Configuration: Release Win32 ------
  1&gt;  
  1&gt;  Starting pass 1
  1&gt;  Processed /DEFAULTLIB:uuid.lib
  1&gt;  Processed /DEFAULTLIB:MSVCRT
  1&gt;  Processed /DEFAULTLIB:OLDNAMES
  1&gt;  
  1&gt;  Searching libraries
  1&gt;      Searching netsnmp.lib:
  1&gt;      Searching C:\net-snmp\lib\netsnmpagent.lib:
  1&gt;      Searching C:\net-snmp\lib\netsnmphelpers.lib:
  1&gt;      Searching C:\net-snmp\lib\netsnmpmibs.lib:
  1&gt;      Searching C:\net-snmp\lib\netsnmptrapd.lib:
  1&gt;      Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\kernel32.lib:
  1&gt;      Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\user32.lib:
  1&gt;      Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\gdi32.lib:
  1&gt;      Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\winspool.lib:
  1&gt;      Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\comdlg32.lib:
  1&gt;      Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\advapi32.lib:
  1&gt;      Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\shell32.lib:
  1&gt;      Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\ole32.lib:
  1&gt;      Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\oleaut32.lib:
  1&gt;      Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\uuid.lib:
  1&gt;      Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\odbc32.lib:
  1&gt;      Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\odbccp32.lib:
  1&gt;      Searching C:\net-snmp\lib\netsnmp.lib:
  1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\lib\MSVCRT.lib:
  1&gt;        Found @__security_check_cookie@4
  1&gt;          Referenced in snmp_test.obj
  1&gt;          Loaded MSVCRT.lib(secchk.obj)
  1&gt;        Found __imp__printf
  1&gt;          Referenced in snmp_test.obj
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found __imp__exit
  1&gt;          Referenced in snmp_test.obj
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found _mainCRTStartup
  1&gt;          Loaded MSVCRT.lib(crtexe.obj)
  1&gt;        Found ___report_gsfailure
  1&gt;          Referenced in MSVCRT.lib(secchk.obj)
  1&gt;          Loaded MSVCRT.lib(gs_report.obj)
  1&gt;        Found ___security_cookie
  1&gt;          Referenced in MSVCRT.lib(secchk.obj)
  1&gt;          Referenced in MSVCRT.lib(gs_report.obj)
  1&gt;          Loaded MSVCRT.lib(gs_cookie.obj)
  1&gt;        Found __IMPORT_DESCRIPTOR_MSVCR110
  1&gt;          Referenced in MSVCRT.lib(MSVCR110.dll)
  1&gt;          Referenced in MSVCRT.lib(MSVCR110.dll)
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found ___CxxSetUnhandledExceptionFilter
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Loaded MSVCRT.lib(unhandld.obj)
  1&gt;        Found __XcptFilter
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found __amsg_exit
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found __setargv
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Loaded MSVCRT.lib(dllargv.obj)
  1&gt;        Found __imp____getmainargs
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found __imp____set_app_type
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found __IsNonwritableInCurrentImage
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Loaded MSVCRT.lib(pesect.obj)
  1&gt;        Found __imp___exit
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found __imp___cexit
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found ___security_init_cookie
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Loaded MSVCRT.lib(gs_support.obj)
  1&gt;        Found __matherr
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Loaded MSVCRT.lib(merr.obj)
  1&gt;        Found _atexit
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Loaded MSVCRT.lib(atonexit.obj)
  1&gt;        Found __RTC_Initialize
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Loaded MSVCRT.lib(initsect.obj)
  1&gt;        Found __imp___configthreadlocale
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found __setdefaultprecision
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Loaded MSVCRT.lib(fp8.obj)
  1&gt;        Found __imp____setusermatherr
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found __initterm_e
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found __initterm
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found __SEH_epilog4
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Referenced in MSVCRT.lib(atonexit.obj)
  1&gt;          Loaded MSVCRT.lib(sehprolg4.obj)
  1&gt;        Found __except_handler4
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Referenced in MSVCRT.lib(pesect.obj)
  1&gt;          Referenced in MSVCRT.lib(atonexit.obj)
  1&gt;          Referenced in MSVCRT.lib(sehprolg4.obj)
  1&gt;          Loaded MSVCRT.lib(chandler4gs.obj)
  1&gt;        Found ___globallocalestatus
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Loaded MSVCRT.lib(xthdloc.obj)
  1&gt;        Found __commode
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Loaded MSVCRT.lib(xncommod.obj)
  1&gt;        Found __dowildcard
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Loaded MSVCRT.lib(wildcard.obj)
  1&gt;        Found __newmode
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Loaded MSVCRT.lib(_newmode.obj)
  1&gt;        Found __imp____initenv
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found ___native_startup_state
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Loaded MSVCRT.lib(natstart.obj)
  1&gt;        Found __fmode
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Loaded MSVCRT.lib(xtxtmode.obj)
  1&gt;        Found __imp___fmode
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found __imp___commode
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found ___xi_a
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Loaded MSVCRT.lib(cinitexe.obj)
  1&gt;  Processed /DEFAULTLIB:kernel32.lib
  1&gt;   Processed /DISALLOWLIB:libcmt.lib
  1&gt;   Processed /DISALLOWLIB:libcmtd.lib
  1&gt;   Processed /DISALLOWLIB:msvcrtd.lib
  1&gt;        Found __crt_debugger_hook
  1&gt;          Referenced in MSVCRT.lib(gs_report.obj)
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found ___crtUnhandledException
  1&gt;          Referenced in MSVCRT.lib(gs_report.obj)
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found ___crtTerminateProcess
  1&gt;          Referenced in MSVCRT.lib(gs_report.obj)
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found __NULL_IMPORT_DESCRIPTOR
  1&gt;          Referenced in MSVCRT.lib(MSVCR110.dll)
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found MSVCR110_NULL_THUNK_DATA
  1&gt;          Referenced in MSVCRT.lib(MSVCR110.dll)
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found "void __cdecl terminate(void)" (?terminate@@YAXXZ)
  1&gt;          Referenced in MSVCRT.lib(unhandld.obj)
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found ___crtSetUnhandledExceptionFilter
  1&gt;          Referenced in MSVCRT.lib(unhandld.obj)
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found __lock
  1&gt;          Referenced in MSVCRT.lib(atonexit.obj)
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found __unlock
  1&gt;          Referenced in MSVCRT.lib(atonexit.obj)
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found __imp___calloc_crt
  1&gt;          Referenced in MSVCRT.lib(atonexit.obj)
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found ___dllonexit
  1&gt;          Referenced in MSVCRT.lib(atonexit.obj)
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found __imp___onexit
  1&gt;          Referenced in MSVCRT.lib(atonexit.obj)
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found __invoke_watson
  1&gt;          Referenced in MSVCRT.lib(fp8.obj)
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found __controlfp_s
  1&gt;          Referenced in MSVCRT.lib(fp8.obj)
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;        Found __except_handler4_common
  1&gt;          Referenced in MSVCRT.lib(chandler4gs.obj)
  1&gt;          Loaded MSVCRT.lib(MSVCR110.dll)
  1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\lib\OLDNAMES.lib:
  1&gt;      Searching netsnmp.lib:
  1&gt;      Searching C:\net-snmp\lib\netsnmpagent.lib:
  1&gt;      Searching C:\net-snmp\lib\netsnmphelpers.lib:
  1&gt;      Searching C:\net-snmp\lib\netsnmpmibs.lib:
  1&gt;      Searching C:\net-snmp\lib\netsnmptrapd.lib:
  1&gt;      Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\kernel32.lib:
  1&gt;        Found __imp__EncodePointer@4
  1&gt;          Referenced in MSVCRT.lib(crtexe.obj)
  1&gt;          Referenced in MSVCRT.lib(atonexit.obj)
  1&gt;          Loaded kernel32.lib(KERNEL32.dll)
  1&gt;        Found __imp__IsDebuggerPresent@0
  1&gt;          Referenced in MSVCRT.lib(gs_report.obj)
  1&gt;          Loaded kernel32.lib(KERNEL32.dll)
  1&gt;        Found _IsProcessorFeaturePresent@4
  1&gt;          Referenced in MSVCRT.lib(gs_report.obj)
  1&gt;          Loaded kernel32.lib(KERNEL32.dll)
  1&gt;        Found __imp__QueryPerformanceCounter@4
  1&gt;          Referenced in MSVCRT.lib(gs_support.obj)
  1&gt;          Loaded kernel32.lib(KERNEL32.dll)
  1&gt;        Found __imp__GetCurrentProcessId@0
  1&gt;          Referenced in MSVCRT.lib(gs_support.obj)
  1&gt;          Loaded kernel32.lib(KERNEL32.dll)
  1&gt;        Found __imp__GetCurrentThreadId@0
  1&gt;          Referenced in MSVCRT.lib(gs_support.obj)
  1&gt;          Loaded kernel32.lib(KERNEL32.dll)
  1&gt;        Found __imp__GetSystemTimeAsFileTime@4
  1&gt;          Referenced in MSVCRT.lib(gs_support.obj)
  1&gt;          Loaded kernel32.lib(KERNEL32.dll)
  1&gt;        Found __imp__DecodePointer@4
  1&gt;          Referenced in MSVCRT.lib(atonexit.obj)
  1&gt;          Loaded kernel32.lib(KERNEL32.dll)
  1&gt;        Found __IMPORT_DESCRIPTOR_KERNEL32
  1&gt;          Referenced in kernel32.lib(KERNEL32.dll)
  1&gt;          Referenced in kernel32.lib(KERNEL32.dll)
  1&gt;          Referenced in kernel32.lib(KERNEL32.dll)
  1&gt;          Referenced in kernel32.lib(KERNEL32.dll)
  1&gt;          Referenced in kernel32.lib(KERNEL32.dll)
  1&gt;          Referenced in kernel32.lib(KERNEL32.dll)
  1&gt;          Referenced in kernel32.lib(KERNEL32.dll)
  1&gt;          Referenced in kernel32.lib(KERNEL32.dll)
  1&gt;          Loaded kernel32.lib(KERNEL32.dll)
  1&gt;        Found KERNEL32_NULL_THUNK_DATA
  1&gt;          Referenced in kernel32.lib(KERNEL32.dll)
  1&gt;          Loaded kernel32.lib(KERNEL32.dll)
  1&gt;      Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\user32.lib:
  1&gt;      Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\gdi32.lib:
  1&gt;      Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\winspool.lib:
  1&gt;      Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\comdlg32.lib:
  1&gt;      Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\advapi32.lib:
  1&gt;      Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\shell32.lib:
  1&gt;      Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\ole32.lib:
  1&gt;      Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\oleaut32.lib:
  1&gt;      Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\uuid.lib:
  1&gt;      Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\odbc32.lib:
  1&gt;      Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\odbccp32.lib:
  1&gt;      Searching C:\net-snmp\lib\netsnmp.lib:
  1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\lib\MSVCRT.lib:
  1&gt;      Searching C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\lib\OLDNAMES.lib:
  1&gt;      Searching netsnmp.lib:
  1&gt;      Searching C:\net-snmp\lib\netsnmpagent.lib:
  1&gt;      Searching C:\net-snmp\lib\netsnmphelpers.lib:
  1&gt;      Searching C:\net-snmp\lib\netsnmpmibs.lib:
  1&gt;      Searching C:\net-snmp\lib\netsnmptrapd.lib:
  1&gt;  
  1&gt;  Finished searching libraries
  1&gt;  
  1&gt;  Finished pass 1
  1&gt;  
  1&gt;snmp_test.obj : error LNK2001: unresolved external symbol _snmp_add_null_var
  1&gt;snmp_test.obj : error LNK2001: unresolved external symbol _add_mibdir
  1&gt;snmp_test.obj : error LNK2001: unresolved external symbol _snmp_synch_response
  1&gt;snmp_test.obj : error LNK2001: unresolved external symbol _snmp_sess_init
  1&gt;snmp_test.obj : error LNK2001: unresolved external symbol _snmp_pdu_create
  1&gt;snmp_test.obj : error LNK2001: unresolved external symbol _snmp_close
  1&gt;snmp_test.obj : error LNK2001: unresolved external symbol _read_objid
  1&gt;snmp_test.obj : error LNK2001: unresolved external symbol _init_snmp
  1&gt;snmp_test.obj : error LNK2001: unresolved external symbol _print_value
  1&gt;snmp_test.obj : error LNK2001: unresolved external symbol _snmp_free_pdu
  1&gt;snmp_test.obj : error LNK2001: unresolved external symbol _read_mib
  1&gt;snmp_test.obj : error LNK2001: unresolved external symbol _snmp_open
  1&gt;W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\Release\snmp_test.exe : fatal error LNK1120: 12 unresolved externals
  ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
  </code></pre>
  
  <p>Linker Configuration Command Line:</p>
  
  <pre><code>/OUT:"W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\Release\snmp_test.exe" /MANIFEST /LTCG 
  /NXCOMPAT /PDB:"W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\Release\snmp_test.pdb" 
  /DYNAMICBASE "netsnmp.lib" "netsnmpagent.lib" "netsnmphelpers.lib" "netsnmpmibs.lib" 
  "netsnmptrapd.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" 
  "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" 
  "odbccp32.lib" /DEBUG /MACHINE:X86 /OPT:REF /SAFESEH /PGD:"W:\SNMP 
  Depot\NetSMNP\snmp_test\snmp_test\Release\snmp_test.pgd" /MANIFESTUAC:"level='asInvoker' 
  uiAccess='false'" /ManifestFile:"Release\snmp_test.exe.intermediate.manifest" /OPT:ICF 
  /ERRORREPORT:PROMPT /NOLOGO /VERBOSE /LIBPATH:"C:\net-snmp\lib" /LIBPATH:"C:\net-snmp\bin" 
  /TLBID:1 
  </code></pre>