C++ API Application Compilation on Linux

Hi, While trying to compile a simple application using Lotus C++ API 3.0 on Linux (Red Hat 7.3), I am getting strang problem with linking. Eventhough the symbols are defined in the provided libraries, it says undefined reference to few symbols as ‘LNNotesSession::LNNotesSessionin-charge’, LNNotesSession::~LNNotesSession [in-charge]()', LNNotesSession::Term(int)'etc.

Command line for compilation is as follows -


gcc -DUNIX -DLINUX -I/home/exports/prakash/Setups/CPP_API_55/include -L/home/exports/prakash/Setups/CPP_API_55/lib/linux -L/opt/lotus/notes/latest/linux -lstdc++ -lcpplin -lnotes ChangeNotification.cpp


Any pointers regarding the same will be appreciated.

Thank you in anticipation.

-Prakash

P.S. Find the error message copy pasted below,

------------ Error Message -----------------

/tmp/cctpfJCv.o: In function `main’:

/tmp/cctpfJCv.o(.text+0xec): undefined reference to `LNNotesSession::LNNotesSessionin-charge’

/tmp/cctpfJCv.o(.text+0x16c): undefined reference to `LNNotesSession::~LNNotesSession in-charge’

/tmp/cctpfJCv.o(.text+0x18a): undefined reference to `LNNotesSession::Term(int)’

/tmp/cctpfJCv.o(.text+0x1ec): undefined reference to `LNNotesSession::~LNNotesSession in-charge’

/tmp/cctpfJCv.o(.text+0x292): undefined reference to `LNNotesSession::~LNNotesSession in-charge’

/tmp/cctpfJCv.o(.text+0x2d5): undefined reference to `LNNotesSession::~LNNotesSession in-charge’

/tmp/cctpfJCv.o(.text+0x2f7): undefined reference to `LNNotesSession::~LNNotesSession in-charge’

/tmp/cctpfJCv.o: In function `LNGetErrorMessage(unsigned long, char*, unsigned long)':

/tmp/cctpfJCv.o(.gnu.linkonce.t._Z17LNGetErrorMessagemPcm+0x12): undefined reference to `LNGetErrorMessageText(unsigned long, char*, unsigned long, int)’

/tmp/cctpfJCv.o: In function `LNSetThrowAllErrors(int)':

/tmp/cctpfJCv.o(.gnu.linkonce.t._Z19LNSetThrowAllErrorsi+0xd): undefined reference to `LNSetThrowAllErrorsGlobal(int)’

/tmp/cctpfJCv.o: In function `LNNotesSession::Init(int, char**)':

/tmp/cctpfJCv.o(.gnu.linkonce.t._ZN14LNNotesSession4InitEiPPc+0x23): undefined reference to `LNNotesSession::Initialize(unsigned long, int, char**, int, char const*)’

collect2: ld returned 1 exit status

------------- End of Error Message ------------

Subject: C++ API Application Compilation on Linux

are there other functions in your source linker did’nt complain about? maybe it’s stops because of those errors…

what does your makefile look like? are you able to compile one of the samples included in c++ api package?

CPP_API_55 is directory of ln c++ api 2.2? (just wondering what 55 stands for).

maybe it’s better to start with one of the samples and follow all advices from c++ api user guide.

Markus Seitz

markus.seitz@icodex.com

Subject: RE: C++ API Application Compilation on Linux

Thanks Markus Seitz.After compiling the code using makefiles provided in samples (with fewer modifications), I could build the application successfully.

-Regards,

Prakash