[AGENT++] sample agent

Jochen Katz katz at agentpp.com
Tue Sep 28 22:38:58 CEST 2010


Hi,

the errors look like you did not add the agent++ and snmp++
libraries/dlls to the linker command. And also don't forget to add the
winsock libraries.

Regards,
  Jochen


Am 28.09.2010 12:45, schrieb Renju Mathew:
>  
> 
> Hi all,
> 
>  
> 
> I am trying to create a sample snmp agent using agent++.
> 
> I have successfully compiled snmp++ and agent++ in VC++. 
> 
> But when I compiled my agent (I'm using the sample agent code in agent++
> tutorial), it's giving following linker errors
> 
> Can anyone help me out in this?
> 
>  
> 
> Thanks & regards
> 
> Renju
> 
>  
> 
>  
> 
> 1>myMain.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to
> '/INCREMENTAL:NO' specification
> 
> 1>myMain.obj : error LNK2019: unresolved external symbol "public:
> __thiscall Snmp::Snmp(int &,unsigned short,bool)"
> (??0Snmp@@QAE at AAHG_N@Z) referenced in function "public: __thiscall
> Snmpx::Snmpx(int &,unsigned short)" (??0Snmpx@@QAE at AAHG@Z)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual int __thiscall Snmp::get(class Pdu &,class SnmpTarget const
> &,void (__cdecl*const)(int,class Snmp *,class Pdu &,class SnmpTarget
> &,void *),void const *)"
> (?get at Snmp@@UAEHAAVPdu@@ABVSnmpTarget@@Q6AXHPAV1 at 0AAV3@PAX at ZPBX@Z)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual int __thiscall Snmp::get(class Pdu &,class SnmpTarget const &)"
> (?get at Snmp@@UAEHAAVPdu@@ABVSnmpTarget@@@Z)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual int __thiscall Snmp::get_next(class Pdu &,class SnmpTarget const
> &,void (__cdecl*const)(int,class Snmp *,class Pdu &,class SnmpTarget
> &,void *),void const *)"
> (?get_next at Snmp@@UAEHAAVPdu@@ABVSnmpTarget@@Q6AXHPAV1 at 0AAV3@PAX at ZPBX@Z)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual int __thiscall Snmp::get_next(class Pdu &,class SnmpTarget const
> &)" (?get_next at Snmp@@UAEHAAVPdu@@ABVSnmpTarget@@@Z)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual int __thiscall Snmp::set(class Pdu &,class SnmpTarget const
> &,void (__cdecl*const)(int,class Snmp *,class Pdu &,class SnmpTarget
> &,void *),void const *)"
> (?set at Snmp@@UAEHAAVPdu@@ABVSnmpTarget@@Q6AXHPAV1 at 0AAV3@PAX at ZPBX@Z)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual int __thiscall Snmp::set(class Pdu &,class SnmpTarget const &)"
> (?set at Snmp@@UAEHAAVPdu@@ABVSnmpTarget@@@Z)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual int __thiscall Snmp::get_bulk(class Pdu &,class SnmpTarget const
> &,int,int,void (__cdecl*const)(int,class Snmp *,class Pdu &,class
> SnmpTarget &,void *),void const *)"
> (?get_bulk at Snmp@@UAEHAAVPdu@@ABVSnmpTarget@@HHQ6AXHPAV1 at 0AAV3@PAX at ZPBX@Z
> )
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual int __thiscall Snmp::get_bulk(class Pdu &,class SnmpTarget const
> &,int,int)" (?get_bulk at Snmp@@UAEHAAVPdu@@ABVSnmpTarget@@HH at Z)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual int __thiscall Snmp::trap(class Pdu &,class SnmpTarget const &)"
> (?trap at Snmp@@UAEHAAVPdu@@ABVSnmpTarget@@@Z)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual int __thiscall Snmp::report(class Pdu &,class SnmpTarget const
> &)" (?report at Snmp@@UAEHAAVPdu@@ABVSnmpTarget@@@Z)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual int __thiscall Snmp::inform(class Pdu &,class SnmpTarget const
> &,void (__cdecl*const)(int,class Snmp *,class Pdu &,class SnmpTarget
> &,void *),void const *)"
> (?inform at Snmp@@UAEHAAVPdu@@ABVSnmpTarget@@Q6AXHPAV1 at 0AAV3@PAX at ZPBX@Z)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual int __thiscall Snmp::inform(class Pdu &,class SnmpTarget const
> &)" (?inform at Snmp@@UAEHAAVPdu@@ABVSnmpTarget@@@Z)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual int __thiscall Snmp::response(class Pdu &,class SnmpTarget const
> &,unsigned int)" (?response at Snmp@@UAEHAAVPdu@@ABVSnmpTarget@@I at Z)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual int __thiscall Snmp::broadcast_discovery(class
> SnmpCollection<class UdpAddress> &,int,class UdpAddress const &,enum
> snmp_version,class OctetStr const *)"
> (?broadcast_discovery at Snmp@@UAEHAAV?$SnmpCollection at VUdpAddress@@@@HABVU
> dpAddress@@W4snmp_version@@PBVOctetStr@@@Z)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual int __thiscall Snmp::engine_id_discovery(class OctetStr
> &,int,class UdpAddress const &)"
> (?engine_id_discovery at Snmp@@UAEHAAVOctetStr@@HABVUdpAddress@@@Z)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual int __thiscall Snmp::cancel(unsigned long)"
> (?cancel at Snmp@@UAEHK at Z)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual void __thiscall Snmp::notify_set_listen_port(int)"
> (?notify_set_listen_port at Snmp@@UAEXH at Z)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual int __thiscall Snmp::notify_get_listen_port(void)"
> (?notify_get_listen_port at Snmp@@UAEHXZ)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual int __thiscall Snmp::notify_register(class SnmpCollection<class
> Oid> const &,class SnmpCollection<class SnmpTarget> const &,class
> SnmpCollection<class GenAddress> const &,void (__cdecl*const)(int,class
> Snmp *,class Pdu &,class SnmpTarget &,void *),void const *)"
> (?notify_register at Snmp@@UAEHABV?$SnmpCollection at VOid@@@@ABV?$SnmpCollect
> ion at VSnmpTarget@@@@ABV?$SnmpCollection at VGenAddress@@@@Q6AXHPAV1 at AAVPdu@@
> AAVSnmpTarget@@PAX at ZPBX@Z)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual int __thiscall Snmp::notify_register(class SnmpCollection<class
> Oid> const &,class SnmpCollection<class SnmpTarget> const &,void
> (__cdecl*const)(int,class Snmp *,class Pdu &,class SnmpTarget &,void
> *),void const *)"
> (?notify_register at Snmp@@UAEHABV?$SnmpCollection at VOid@@@@ABV?$SnmpCollect
> ion at VSnmpTarget@@@@Q6AXHPAV1 at AAVPdu@@AAVSnmpTarget@@PAX at ZPBX@Z)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual int __thiscall Snmp::notify_unregister(void)"
> (?notify_unregister at Snmp@@UAEHXZ)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual int __thiscall Snmp::get_notify_filter(class
> SnmpCollection<class Oid> &,class SnmpCollection<class SnmpTarget>
> &,class SnmpCollection<class GenAddress> &)"
> (?get_notify_filter at Snmp@@UAEHAAV?$SnmpCollection at VOid@@@@AAV?$SnmpColle
> ction at VSnmpTarget@@@@AAV?$SnmpCollection at VGenAddress@@@@@Z)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual int __thiscall Snmp::send_raw_data(unsigned char *,unsigned
> int,class UdpAddress &,unsigned int)"
> (?send_raw_data at Snmp@@UAEHPAEIAAVUdpAddress@@I at Z)
> 
> 1>myMain.obj : error LNK2019: unresolved external symbol "public:
> virtual __thiscall Snmp::~Snmp(void)" (??1Snmp@@UAE at XZ) referenced in
> function "public: virtual __thiscall Snmpx::~Snmpx(void)"
> (??1Snmpx@@UAE at XZ)
> 
> 1>myMain.obj : error LNK2019: unresolved external symbol "public:
> __thiscall Thread::Thread(class Runnable &)"
> (??0Thread@@QAE at AAVRunnable@@@Z) referenced in function "public: class
> Thread * __thiscall Thread::clone(void)" (?clone at Thread@@QAEPAV1 at XZ)
> 
> 1>myMain.obj : error LNK2019: unresolved external symbol "public: class
> Runnable & __thiscall Thread::get_runnable(void)"
> (?get_runnable at Thread@@QAEAAVRunnable@@XZ) referenced in function
> "public: class Thread * __thiscall Thread::clone(void)"
> (?clone at Thread@@QAEPAV1 at XZ)
> 
> 1>myMain.obj : error LNK2019: unresolved external symbol "public:
> __thiscall TaskManager::TaskManager(class ThreadPool *,int)"
> (??0TaskManager@@QAE at PAVThreadPool@@H at Z) referenced in function "public:
> class TaskManager * __thiscall TaskManager::clone(void)"
> (?clone at TaskManager@@QAEPAV1 at XZ)
> 
> 1>myMain.obj : error LNK2019: unresolved external symbol "public:
> __thiscall ThreadPool::ThreadPool(int,int)" (??0ThreadPool@@QAE at HH@Z)
> referenced in function "public: class TaskManager * __thiscall
> TaskManager::clone(void)" (?clone at TaskManager@@QAEPAV1 at XZ)
> 
> 1>myMain.obj : error LNK2019: unresolved external symbol "public: class
> Oidx * __thiscall MibEntry::key(void)" (?key at MibEntry@@QAEPAVOidx@@XZ)
> referenced in function "public: class MibEntry * __thiscall
> OidList<class MibEntry>::add(class MibEntry *)"
> (?add@?$OidList at VMibEntry@@@@QAEPAVMibEntry@@PAV2@@Z)
> 
> 1>myMain.obj : error LNK2019: unresolved external symbol "int __cdecl
> operator<(class Oid const &,class Oid const &)" (??M at YAHABVOid@@0 at Z)
> referenced in function "public: class MibEntry * __thiscall
> OidList<class MibEntry>::find_lower(class Oidx *)const "
> (?find_lower@?$OidList at VMibEntry@@@@QBEPAVMibEntry@@PAVOidx@@@Z)
> 
> 1>myMain.obj : error LNK2019: unresolved external symbol "public: void *
> __thiscall OidxPtrEntryPtrAVLMap::seek_inexact(class Oidx *)const "
> (?seek_inexact at OidxPtrEntryPtrAVLMap@@QBEPAXPAVOidx@@@Z) referenced in
> function "public: class MibEntry * __thiscall OidList<class
> MibEntry>::find_lower(class Oidx *)const "
> (?find_lower@?$OidList at VMibEntry@@@@QBEPAVMibEntry@@PAVOidx@@@Z)
> 
> 1>myMain.obj : error LNK2019: unresolved external symbol "int __cdecl
> operator==(class Oid const &,class Oid const &)" (??8 at YAHABVOid@@0 at Z)
> referenced in function "int __cdecl operator<=(class Oid const &,class
> Oid const &)" (??N at YAHABVOid@@0 at Z)
> 
> 1>myMain.obj : error LNK2019: unresolved external symbol "protected:
> struct OidxPtrEntryPtrAVLNode * __thiscall
> OidxPtrEntryPtrAVLMap::rightmost(void)const "
> (?rightmost at OidxPtrEntryPtrAVLMap@@IBEPAUOidxPtrEntryPtrAVLNode@@XZ)
> referenced in function "public: void * __thiscall
> OidxPtrEntryPtrAVLMap::last(void)const "
> (?last at OidxPtrEntryPtrAVLMap@@QBEPAXXZ)
> 
> 1>myMain.obj : error LNK2019: unresolved external symbol "protected:
> struct OidxPtrEntryPtrAVLNode * __thiscall
> OidxPtrEntryPtrAVLMap::pred(struct OidxPtrEntryPtrAVLNode *)const "
> (?pred at OidxPtrEntryPtrAVLMap@@IBEPAUOidxPtrEntryPtrAVLNode@@PAU2@@Z)
> referenced in function "public: void __thiscall
> OidxPtrEntryPtrAVLMap::prev(void * &)const "
> (?prev at OidxPtrEntryPtrAVLMap@@QBEXAAPAX at Z)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual void * & __thiscall OidxPtrEntryPtrAVLMap::operator[](class Oidx
> *)" (??AOidxPtrEntryPtrAVLMap@@UAEAAPAXPAVOidx@@@Z)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual void __thiscall OidxPtrEntryPtrAVLMap::del(class Oidx *)"
> (?del at OidxPtrEntryPtrAVLMap@@UAEXPAVOidx@@@Z)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual int __thiscall OidxPtrEntryPtrMap::owns(void *)"
> (?owns at OidxPtrEntryPtrMap@@UAEHPAX at Z)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual void * __thiscall OidxPtrEntryPtrAVLMap::seek(class Oidx *)const
> " (?seek at OidxPtrEntryPtrAVLMap@@UBEPAXPAVOidx@@@Z)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual int __thiscall OidxPtrEntryPtrAVLMap::OK(void)"
> (?OK at OidxPtrEntryPtrAVLMap@@UAEHXZ)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual int __thiscall OidxPtrEntryPtrMap::contains(class Oidx *)const "
> (?contains at OidxPtrEntryPtrMap@@UBEHPAVOidx@@@Z)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual void __thiscall OidxPtrEntryPtrMap::clear(void)"
> (?clear at OidxPtrEntryPtrMap@@UAEXXZ)
> 
> 1>myMain.obj : error LNK2001: unresolved external symbol "public:
> virtual void * __thiscall OidxPtrEntryPtrMap::seek(class Oidx *)const "
> (?seek at OidxPtrEntryPtrMap@@UBEPAXPAVOidx@@@Z)
> 
> 1>myMain.obj : error LNK2019: unresolved external symbol "protected:
> void __thiscall OidxPtrEntryPtrAVLMap::_kill(struct
> OidxPtrEntryPtrAVLNode *)"
> (?_kill at OidxPtrEntryPtrAVLMap@@IAEXPAUOidxPtrEntryPtrAVLNode@@@Z)
> referenced in function "public: virtual __thiscall
> OidxPtrEntryPtrAVLMap::~OidxPtrEntryPtrAVLMap(void)"
> (??1OidxPtrEntryPtrAVLMap@@UAE at XZ)
> 
> 1>myMain.obj : error LNK2019: unresolved external symbol "protected:
> struct OidxPtrEntryPtrAVLNode * __thiscall
> OidxPtrEntryPtrAVLMap::leftmost(void)const "
> (?leftmost at OidxPtrEntryPtrAVLMap@@IBEPAUOidxPtrEntryPtrAVLNode@@XZ)
> referenced in function "public: virtual void * __thiscall
> OidxPtrEntryPtrAVLMap::first(void)const "
> (?first at OidxPtrEntryPtrAVLMap@@UBEPAXXZ)
> 
> 1>myMain.obj : error LNK2019: unresolved external symbol "protected:
> struct OidxPtrEntryPtrAVLNode * __thiscall
> OidxPtrEntryPtrAVLMap::succ(struct OidxPtrEntryPtrAVLNode *)const "
> (?succ at OidxPtrEntryPtrAVLMap@@IBEPAUOidxPtrEntryPtrAVLNode@@PAU2@@Z)
> referenced in function "public: virtual void __thiscall
> OidxPtrEntryPtrAVLMap::next(void * &)const "
> (?next at OidxPtrEntryPtrAVLMap@@UBEXAAPAX at Z)
> 
> 1>myMain.obj : error LNK2019: unresolved external symbol "public: void
> __thiscall OidxPtrEntryPtrMap::error(char const *)const "
> (?error at OidxPtrEntryPtrMap@@QBEXPBD at Z) referenced in function "public:
> virtual class Oidx * & __thiscall OidxPtrEntryPtrAVLMap::key(void
> *)const " (?key at OidxPtrEntryPtrAVLMap@@UBEAAPAVOidx@@PAX at Z)
> 
> 1>myMain.obj : error LNK2019: unresolved external symbol "public: int
> __thiscall MibEntry::operator<(class MibEntry const &)const "
> (??MMibEntry@@QBEHABV0@@Z) referenced in function "public: class MibLeaf
> * __thiscall OrderedList<class MibLeaf>::add(class MibLeaf *)"
> (?add@?$OrderedList at VMibLeaf@@@@QAEPAVMibLeaf@@PAV2@@Z)
> 
> 1>myMain.obj : error LNK2019: unresolved external symbol "public: int
> __thiscall MibEntry::operator>(class MibEntry const &)const "
> (??OMibEntry@@QBEHABV0@@Z) referenced in function "public: class MibLeaf
> * __thiscall OrderedList<class MibLeaf>::addLast(class MibLeaf *)"
> (?addLast@?$OrderedList at VMibLeaf@@@@QAEPAVMibLeaf@@PAV2@@Z)
> 
> 1>myMain.obj : error LNK2019: unresolved external symbol "public: int
> __thiscall MibEntry::operator==(class MibEntry const &)const "
> (??8MibEntry@@QBEHABV0@@Z) referenced in function "public: class MibLeaf
> * __thiscall OrderedList<class MibLeaf>::addUnique(class MibLeaf *)"
> (?addUnique@?$OrderedList at VMibLeaf@@@@QAEPAVMibLeaf@@PAV2@@Z)
> 
> 1>myMain.obj : error LNK2019: unresolved external symbol "public: int
> __thiscall MibTableRow::operator<(class MibTableRow const &)"
> (??MMibTableRow@@QAEHABV0@@Z) referenced in function "public: class
> MibTableRow * __thiscall OrderedList<class MibTableRow>::add(class
> MibTableRow *)"
> (?add@?$OrderedList at VMibTableRow@@@@QAEPAVMibTableRow@@PAV2@@Z)
> 
> 1>myMain.obj : error LNK2019: unresolved external symbol "public: int
> __thiscall MibTableRow::operator>(class MibTableRow const &)"
> (??OMibTableRow@@QAEHABV0@@Z) referenced in function "public: class
> MibTableRow * __thiscall OrderedList<class MibTableRow>::addLast(class
> MibTableRow *)"
> (?addLast@?$OrderedList at VMibTableRow@@@@QAEPAVMibTableRow@@PAV2@@Z)
> 
> 1>myMain.obj : error LNK2019: unresolved external symbol "public: int
> __thiscall MibTableRow::operator==(class MibTableRow const &)"
> (??8MibTableRow@@QAEHABV0@@Z) referenced in function "public: class
> MibTableRow * __thiscall OrderedList<class MibTableRow>::addUnique(class
> MibTableRow *)"
> (?addUnique@?$OrderedList at VMibTableRow@@@@QAEPAVMibTableRow@@PAV2@@Z)
> 
> 1>myMain.obj : error LNK2019: unresolved external symbol "public: class
> Oidx * __thiscall MibContext::key(void)"
> (?key at MibContext@@QAEPAVOidx@@XZ) referenced in function "public: class
> MibContext * __thiscall OidList<class MibContext>::add(class MibContext
> *)" (?add@?$OidList at VMibContext@@@@QAEPAVMibContext@@PAV2@@Z)
> 
> 1>myMain.obj : error LNK2019: unresolved external symbol "public:
> __thiscall LockRequest::~LockRequest(void)" (??1LockRequest@@QAE at XZ)
> referenced in function "public: void * __thiscall LockRequest::`scalar
> deleting destructor'(unsigned int)" (??_GLockRequest@@QAEPAXI at Z)
> 
> 1>myMain.obj : error LNK2019: unresolved external symbol "public:
> __thiscall ProxyForwarder::~ProxyForwarder(void)"
> (??1ProxyForwarder@@QAE at XZ) referenced in function "public: void *
> __thiscall ProxyForwarder::`scalar deleting destructor'(unsigned int)"
> (??_GProxyForwarder@@QAEPAXI at Z)
> 
> 1>D:\Tests\VCTests\Debug\basics.exe : fatal error LNK1120: 56 unresolved
> externals
> 
> 1>Build log was saved at
> "file://d:\Tests\VCTests\basics\Debug\BuildLog.htm"
> 
> 1>basics - 57 error(s), 1 warning(s)
> 
> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
> ==========
> 
>  
> 
>  
> 
> _______________________________________________
> AGENTPP mailing list
> AGENTPP at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/agentpp
> 



More information about the AGENTPP mailing list