Unable to link in Linux..

Frank Fock Frank.Fock____t-online.de
Wed Sep 5 21:27:33 CEST 2001


Billy,

Please check your makefile, it seems that you do not link against the
SNMP++ library (i.e., -lsnmp++ is missing).

Best regards,
Frank

Billy Davis wrote:

>       I just downloaded snmp++v3.1 and built it on a Linux machine.
> Everything built and ran fine. I then made a simple little program
> that is very similiar ( almost identical ) to the receive_trap
> example. Actually the only difference is that main function has been
> renamed, and the trap collector is being ran in its own thread. But
> when it comes time to link my program I get the following errors.
>
> g++ -D__linux__ -D__x86__ -I/home/bdavis/snmpController
> -I/home/bdavis/snmp++/include -I/usr/local/include
> -I/usr/local/src/omni302/include -lsnmp++ -ldes
> -L/usr/local/src/omni302/lib/i586_linux_2.0_glibc2.1 -lCOS3 -lomniORB3
> -lomnithread -o snmpCorbaTrapAgent.0.0a Globals.o decodeIOR.o
> snmpThread.o Controller.o Controller_impl.o Event.o main.o
>
> snmpThread.o: In function `TrapThread(void *)':
>
> snmpThread.o(.text+0xdff): undefined reference to
> `SnmpCollection<Oid>::SnmpCollection(void)'
>
> snmpThread.o(.text+0xe11): undefined reference to
> `SnmpCollection<SnmpTarget>::SnmpCollection(void)'
>
> collect2: ld returned 1 exit status
>
> make: *** [snmpCorbaTrapAgent.0.0a] Error 1
>
>     Of course, I had the same code working great in Windows ... but I
> really need to port it to both Linux and Solaris.




More information about the AGENTPP mailing list