[AGENT++] linking error, msec.cpp:277: undefined reference to `Snmp_pp::msec::m_localtime_mutex'

Gens Michael.Gens at TU-Berlin.DE
Wed Jun 11 10:52:21 CEST 2014


Hello,

I wrote a short program to get some (switch) information only. But I get 
the linking errors


...
Building target: snmp++get

Invoking: GCC C++ Linker

g++ -L/usr/lib64/ -o "snmp++get"  ./snmp++-3.3.4/src/address.o 
./snmp++-3.3.4/src/asn1.o ./snmp++-3.3.4/src/counter.o 
./snmp++-3.3.4/src/ctr64.o ./snmp++-3.3.4/src/eventlist.o 
./snmp++-3.3.4/src/eventlistholder.o ./snmp++-3.3.4/src/gauge.o 
./snmp++-3.3.4/src/integer.o ./snmp++-3.3.4/src/log.o 
./snmp++-3.3.4/src/mp_v3.o ./snmp++-3.3.4/src/msec.o 
./snmp++-3.3.4/src/msgqueue.o ./snmp++-3.3.4/src/notifyqueue.o 
./snmp++-3.3.4/src/octet.o ./snmp++-3.3.4/src/oid.o 
./snmp++-3.3.4/src/pdu.o ./snmp++-3.3.4/src/reentrant.o 
./snmp++-3.3.4/src/snmpmsg.o ./snmp++-3.3.4/src/target.o 
./snmp++-3.3.4/src/timetick.o ./snmp++-3.3.4/src/usm_v3.o 
./snmp++-3.3.4/src/uxsnmp.o ./snmp++-3.3.4/src/v3.o 
./snmp++-3.3.4/src/vb.o  ./get_group.o ./get_singleMIB.o ./help.o 
./mainSnmp++get.o ./usage.o

./snmp++-3.3.4/src/msec.o: In function `Snmp_pp::msec::get_printable() 
const':
/home/gens/programming/eclipse/c/snmp++get/Debug/../snmp++-3.3.4/src/msec.cpp:277: 
undefined reference to `Snmp_pp::msec::m_localtime_mutex'

./snmp++-3.3.4/src/uxsnmp.o: In function 
`Snmp_pp::Snmp::start_poll_thread(int)':
/home/gens/programming/eclipse/c/snmp++get/Debug/../snmp++-3.3.4/src/uxsnmp.cpp:2262: 
undefined reference to `pthread_create'

./snmp++-3.3.4/src/uxsnmp.o: In function 
`Snmp_pp::Snmp::stop_poll_thread()':
/home/gens/programming/eclipse/c/snmp++get/Debug/../snmp++-3.3.4/src/uxsnmp.cpp:2296: 
undefined reference to `pthread_join'



... and I do not understand why there are no compiler errors and I have 
no clue what to do and how to avoid the linker errors.

Can anybody help?

If you need more detailed information please ask.


Thank you very much in advance.


-- 

Best Rgds.


                    Michael



More information about the AGENTPP mailing list