rajeche
June 9th, 2009, 11:43 AM
I have used a Forward Class in my Project and while I am Compiling using G++ 4.2 Version in UBUNTU 8.04.02, getting Undefined Reference.
Master Library is DeviceManager:
has
protocolHandler.cpp- I attached it as SngSnmpProtocolHandlercpp.txt
protocolHandler.h- I attached it as SngSnmpProtocolHandlerh.txt
-----------------------
Second Library which uses Master Library(DeviceManager)
ABUCProtocolHandler.h - I attached file as SngSnmpABUCProtocolHandlerh.txt
ABUCProtocolHandler.cpp - I attached file as SngSnmpABUCProtocolHandlercpp.txt
finally these two libraries will be used in another EXE project. while compiling that project i am getting the error, the error messageas given below
I am also positing the Makefile which i have used in EXE project.
Makefile name as attached is Makefile.NMSBUC.EXE
Error Message:
/usr/sngsnmp/Lib/Lib/libABUC.a(SngSnmpABUC_V1_3_0_ProtocolHandler.o):(. rodata._ZTV34SngSnmpABUC_V1_3_0_ProtocolHandler[vtable for SngSnmpABUC_V1_3_0_ProtocolHandler]+0x10): undefined reference to `SngSnmpProtocolHandler::Write(SngSnmpCommand&)'
/usr/sngsnmp/Lib/Lib/libABUC.a(SngSnmpABUC_V1_3_0_ProtocolHandler.o):(. rodata._ZTV34SngSnmpABUC_V1_3_0_ProtocolHandler[vtable for SngSnmpABUC_V1_3_0_ProtocolHandler]+0x14): undefined reference to `SngSnmpProtocolHandler::Read(SngSnmpCommand&)'
/usr/sngsnmp/Lib/Lib/libABUC.a(SngSnmpABUCProtocolHandler.o): In function `SngSnmpABUCProtocolHandler::~SngSnmpABUCProtocolH andler()':
SngSnmpABUCProtocolHandler.cpp:(.text+0x234): undefined reference to `SngSnmpProtocolHandler::~SngSnmpProtocolHandler() '
/usr/sngsnmp/Lib/Lib/libABUC.a(SngSnmpABUCProtocolHandler.o): In function `SngSnmpABUCProtocolHandler::SngSnmpABUCProtocolHa ndler()':
SngSnmpABUCProtocolHandler.cpp:(.text+0x29e): undefined reference to `SngSnmpProtocolHandler::SngSnmpProtocolHandler()
It will be appreciated if anyone helps me.. I have spent more time on time on it and am clueless.
There was no sintax or any logical problems.
Master Library is DeviceManager:
has
protocolHandler.cpp- I attached it as SngSnmpProtocolHandlercpp.txt
protocolHandler.h- I attached it as SngSnmpProtocolHandlerh.txt
-----------------------
Second Library which uses Master Library(DeviceManager)
ABUCProtocolHandler.h - I attached file as SngSnmpABUCProtocolHandlerh.txt
ABUCProtocolHandler.cpp - I attached file as SngSnmpABUCProtocolHandlercpp.txt
finally these two libraries will be used in another EXE project. while compiling that project i am getting the error, the error messageas given below
I am also positing the Makefile which i have used in EXE project.
Makefile name as attached is Makefile.NMSBUC.EXE
Error Message:
/usr/sngsnmp/Lib/Lib/libABUC.a(SngSnmpABUC_V1_3_0_ProtocolHandler.o):(. rodata._ZTV34SngSnmpABUC_V1_3_0_ProtocolHandler[vtable for SngSnmpABUC_V1_3_0_ProtocolHandler]+0x10): undefined reference to `SngSnmpProtocolHandler::Write(SngSnmpCommand&)'
/usr/sngsnmp/Lib/Lib/libABUC.a(SngSnmpABUC_V1_3_0_ProtocolHandler.o):(. rodata._ZTV34SngSnmpABUC_V1_3_0_ProtocolHandler[vtable for SngSnmpABUC_V1_3_0_ProtocolHandler]+0x14): undefined reference to `SngSnmpProtocolHandler::Read(SngSnmpCommand&)'
/usr/sngsnmp/Lib/Lib/libABUC.a(SngSnmpABUCProtocolHandler.o): In function `SngSnmpABUCProtocolHandler::~SngSnmpABUCProtocolH andler()':
SngSnmpABUCProtocolHandler.cpp:(.text+0x234): undefined reference to `SngSnmpProtocolHandler::~SngSnmpProtocolHandler() '
/usr/sngsnmp/Lib/Lib/libABUC.a(SngSnmpABUCProtocolHandler.o): In function `SngSnmpABUCProtocolHandler::SngSnmpABUCProtocolHa ndler()':
SngSnmpABUCProtocolHandler.cpp:(.text+0x29e): undefined reference to `SngSnmpProtocolHandler::SngSnmpProtocolHandler()
It will be appreciated if anyone helps me.. I have spent more time on time on it and am clueless.
There was no sintax or any logical problems.