[AGENT++] Strange linking errors from only one of the applications!

Fedja Jeleskovic mrawd2 at gmail.com
Mon Jan 30 05:43:15 CET 2006


Hi there!!

Well, I got stuck with a strange problem and I would really appreciate some help here! I have two application (both using snmp++ and agent++ libraries) and while one of them manages to link all of the code without any complains, the other one is full of errors. The make it even more strange, those errors if legit, would have to be part of the first application too, but they are not. Here is the linker output of both applications. The first one is the good one:

/opt/crosstool/gcc-3.4.4-glibc-2.3.5/i686-unknown-linux-gnu/i686-unknown-linux-gnu/bin/g++ -fpermissive  -I../../HMCommon/Inc -Xlinker --dynamic-linker -Xlinker /lib/empirix/ld-linux.so.2 -Xlinker -rpath -Xlinker /lib/empirix -Xlinker -rpath-link -Xlinker /opt/crosstool/gcc-3.4.4-glibc-2.3.5/i686-unknown-linux-gnu/i686-unknown-linux-gnu/lib  -o ../Bin/i686-release/hmsnmp -lpthread ./build/i686-release/emp_config_mib.o ./build/i686-release/emp_error_stats_mib.o ./build/i686-release/emp_stats_mib.o ./build/i686-release/event_holder.o ./build/i686-release/interface.o ./build/i686-release/main.o ./build/i686-release/notifications.o ./build/i686-release/parser.o ./build/i686-release/snmpv2_mib.o ../../HMCommon/Lib/i686-release/libIPC.a ../../HMCommon/Lib/i686-release/libSocket.a ../../HMCommon/Lib/i686-release/libUtilLib.a ../../HMCommon/Lib/i686-release/libsnmp++.a ../../HMCommon/Lib/i686-release/libdes.a ../../HMCommon/Lib/i686-release/libagent++.a ../../HMCommon/Lib/i686-release/libParserBase.a
done building 


Here is the bad one that gives me tens of error pages:

/opt/crosstool/gcc-3.4.4-glibc-2.3.5/i686-unknown-linux-gnu/i686-unknown-linux-gnu/bin/g++ -fpermissive  -I../../HMCommon/Inc -Xlinker --dynamic-linker -Xlinker /lib/empirix/ld-linux.so.2 -Xlinker -rpath -Xlinker /lib/empirix -Xlinker -rpath-link -Xlinker /opt/crosstool/gcc-3.4.4-glibc-2.3.5/i686-unknown-linux-gnu/i686-unknown-linux-gnu/lib  -o ../Bin/i686-release/cfg_snmp -lpthread ./build/i686-release/main.o ./build/i686-release/update.o ../../HMCommon/Lib/i686-release/libsnmp++.a ../../HMCommon/Lib/i686-release/libagent++.a ../../HMCommon/Lib/i686-release/libParserBase.a
../../HMCommon/Lib/i686-release/libagent++.a(mib.o)(.text+0x877): In function `Agentpp::MibLeaf::set_syntax(unsigned long)':
: undefined reference to `SnmpInt32::SnmpInt32()'
../../HMCommon/Lib/i686-release/libagent++.a(mib.o)(.text+0x9b3): In function `Agentpp::MibLeaf::set_syntax(unsigned long)':
: undefined reference to `Counter64::Counter64()'
../../HMCommon/Lib/i686-release/libagent++.a(mib.o)(.text+0xa02): In function `Agentpp::MibLeaf::set_syntax(unsigned long)':
: undefined reference to `OctetStr::OctetStr()'
../../HMCommon/Lib/i686-release/libagent++.a(mib.o)(.text+0xaa0): In function `Agentpp::MibLeaf::set_syntax(unsigned long)':
: undefined reference to `IpAddress::IpAddress()'
../../HMCommon/Lib/i686-release/libagent++.a(mib.o)(.text+0xbfe): In function `Agentpp::MibLeaf::set_value(unsigned long)':
: undefined reference to `SnmpInt32::operator=(long)'
../../HMCommon/Lib/i686-release/libagent++.a(mib.o)(.text+0xc28): In function `Agentpp::MibLeaf::set_value(Agentpp::Vbx const&)':
: undefined reference to `Vb::valid() const'

Anyone has any idea why would one work fine, while the other one would not. Both applications have almost identical makefiles and after checking them several times I believe they are correct.

Thanks a lot!


Fedja



More information about the AGENTPP mailing list