我现在要做一个snmpget的小程序,加入winsnmp头文件后,应用其对应的函数能编译通过,但我build的时候总提示链接错误,如何解决?SNMPAPI_STATUS CALLBACK cbFunc
   (HSNMP_SESSION hSession, HWND hWnd, UINT wMsg,
    WPARAM wParam, LPARAM lParam, LPVOID lpClientData)
{
if (wParam ==  0) // Normal response
{
HSNMP_PDU hPdu;
    HSNMP_VBL hVbl;
    smiOID dName;
    smiVALUE dValue;
    smiUINT32 nVb;
    smiINT32 lReqId;
    smiINT32 lType, lErr, lIdx;
    smiINT32 lStat;
    smiUINT32 i;
    char szName[64];
    char szValue[256];
    lStat = SnmpRecvMsg (hSession, NULL, NULL, NULL, &hPdu);
    lStat = SnmpGetPduData (hPdu, &lType, &lReqId, &lErr, &lIdx, &hVbl);
    if (lErr != 0)
printf ("SNMP Error for RequestID = %d: Value = %d, Index =  %d\n",
               lReqId, lErr, lIdx);
else
{
nVb = SnmpCountVbl (hVbl);
for (i=0; i<nVb; i++)
{
lStat = SnmpGetVb (hVbl, i+1, &dName, &dValue);
lStat = SnmpOidToStr (&dName, sizeof(szName), szName);
lStat = Val2Str (&dValue, sizeof(szValue), szValue);
printf ("%s: %s\n", szName, szValue);
    lStat = SnmpFreeDescriptor (SNMP_SYNTAX_OCTETS, (smiLPOPAQUE)&dName);
lStat = SnmpFreeDescriptor (dValue.syntax,
                                     (smiLPOPAQUE)&dValue.value.oid);
} // end_for
} // end_else
lStat = SnmpFreeVbl (hVbl);
lStat = SnmpFreePdu (hPdu);
} // end_if wParam == 0
else
    {
printf ("Request #%d timed out.\n", lParam);
    }
SetEvent (xWait);
return (SNMPAPI_SUCCESS);
}inking...
snmpget.obj : error LNK2001: unresolved external symbol _SnmpFreePdu@4
snmpget.obj : error LNK2001: unresolved external symbol _SnmpFreeVbl@4
snmpget.obj : error LNK2001: unresolved external symbol _SnmpFreeDescriptor@8
snmpget.obj : error LNK2001: unresolved external symbol _SnmpOidToStr@12
Val2Str.obj : error LNK2001: unresolved external symbol _SnmpOidToStr@12
snmpget.obj : error LNK2001: unresolved external symbol _SnmpGetVb@16
snmpget.obj : error LNK2001: unresolved external symbol _SnmpCountVbl@4
snmpget.obj : error LNK2001: unresolved external symbol _SnmpGetPduData@24
snmpget.obj : error LNK2001: unresolved external symbol _SnmpRecvMsg@20
Debug/snmpget.exe : fatal error LNK1120: 8 unresolved externals
Error executing link.exe.snmpget.exe - 10 error(s), 0 warning(s)