I am trying to run the sample dbtitle.cpp. It compiles using the make file provided for linux but fails during linking. My environment is Redhat 9.0 with Domino 6.5 installed and C++ toolkit 3.0.
.bash_profile has the following setup
export LD_ASSUME_KERNEL=2.2.5
export LOTUS=/opt/lotus
export PATH=$PATH:/opt/lotus/notes/latest/linux/res/C:/local/notesdata:/opt/lotus/notes/latest/linux
export NOTES_DATA_DIR=/local/notesdata
export CPPAPI_ID=30
export Notes_ExecDirectory=/opt/lotus/notes/latest/linux
export LD_LIBRARY_PATH=/opt/lotus/notescpp/lib/linux:/opt/lotus/notes/latest/linux
The compilation/linking looks like this after the makefile is run
g++ -c -m486 -w -Os -DUNIX -DLINUX -DLINUX20 -DPTHREAD_KERNEL -D_REENTRANT -DUSE_THREADSAFE_INTERFACES -D_POSIX_THREAD_SAFE_FUNCTIONS -DHANDLE_IS_32BITS -DHAS_BOOL -DHAS_DLOPEN -DFUTUREUNIX1 -DUSE_PTHREAD_INTERFACES -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -I/opt/lotus/notescpp/include dbtitle.cpp
g++ -L/opt/lotus/notescpp/lib/linux -o dbtitle dbtitle.o -L/opt/lotus/notes/latest/linux \
/opt/lotus/notescpp/lib/linux/libcpplin.so.30 -lnotes -lm -lnsl -lpthread -lc -ldl -lresolv
The error obtained during linking is:
dbtitle.o(.text+0x27): In function `main’:
: undefined reference to `LNNotesSession::LNNotesSessionin-charge’
dbtitle.o(.text+0x3d): In function `main’:
: undefined reference to `LNString::LNStringin-charge’
dbtitle.o(.text+0x63): In function `main’:
: undefined reference to `LNSetThrowAllErrorsGlobal(int)’
dbtitle.o(.text+0x7c): In function `main’:
: undefined reference to `LNNotesSession::Initialize(unsigned long, int, char**, int, char const*)’
dbtitle.o(.text+0xa0): In function `main’:
: undefined reference to `vtable for LNString’
dbtitle.o(.text+0xa5): In function `main’:
: undefined reference to `LNString::Setup(char const*)’
dbtitle.o(.text+0xce): In function `main’:
: undefined reference to `vtable for LNString’
dbtitle.o(.text+0xd3): In function `main’:
: undefined reference to `LNString::Setup(char const*)’
dbtitle.o(.text+0xea): In function `main’:
: undefined reference to `LNNotesSession::GetDatabase(LNString const&, LNDatabase*, LNString const&)’
dbtitle.o(.text+0xf9): In function `main’:
: undefined reference to `LNString::~LNString in-charge’
dbtitle.o(.text+0x107): In function `main’:
: undefined reference to `LNString::~LNString in-charge’
dbtitle.o(.text+0x112): In function `main’:
: undefined reference to `LNDatabase::Open()’
dbtitle.o(.text+0x11f): In function `main’:
: undefined reference to `LNDatabase::GetTitle()’
dbtitle.o(.text+0x12e): In function `main’:
: undefined reference to `LNString::operator=(LNString const&)’
dbtitle.o(.text+0x13d): In function `main’:
: undefined reference to `LNString::~LNString in-charge’
dbtitle.o(.text+0x14b): In function `main’:
: undefined reference to `LNString::GetPlatformTextPtr() const’
dbtitle.o(.text+0x17c): In function `main’:
: undefined reference to `LNDatabase::Close()’
dbtitle.o(.text+0x187): In function `main’:
: undefined reference to `LNNotesSession::Term(int)’
dbtitle.o(.text+0x193): In function `main’:
: undefined reference to `LNString::~LNString in-charge’
dbtitle.o(.text+0x19a): In function `main’:
: undefined reference to `vtable for LNSmartPtr’
dbtitle.o(.text+0x1a2): In function `main’:
: undefined reference to `LNSmartPtr::DeleteBody()’
dbtitle.o(.text+0x1aa): In function `main’:
: undefined reference to `LNNotesSession::~LNNotesSession in-charge’
dbtitle.o(.text+0x1fc): In function `main’:
: undefined reference to `LNString::~LNString in-charge’
dbtitle.o(.text+0x206): In function `main’:
: undefined reference to `vtable for LNSmartPtr’
dbtitle.o(.text+0x20e): In function `main’:
: undefined reference to `LNSmartPtr::DeleteBody()’
dbtitle.o(.text+0x219): In function `main’:
: undefined reference to `LNNotesSession::~LNNotesSession in-charge’
dbtitle.o(.text+0x227): In function `main’:
: undefined reference to `vtable for LNSmartPtr’
dbtitle.o(.text+0x231): In function `main’:
: undefined reference to `LNSmartPtr::DeleteBody()’
dbtitle.o(.text+0x255): In function `main’:
: undefined reference to `LNGetErrorMessageText(unsigned long, char*, unsigned long, int)’
dbtitle.o(.text+0x295): In function `main’:
: undefined reference to `LNString::~LNString in-charge’
dbtitle.o(.text+0x2a1): In function `main’:
: undefined reference to `vtable for LNSmartPtr’
dbtitle.o(.text+0x2a6): In function `main’:
: undefined reference to `LNSmartPtr::DeleteBody()’
dbtitle.o(.text+0x2af): In function `main’:
: undefined reference to `vtable for LNSmartPtr’
dbtitle.o(.text+0x2b9): In function `main’:
: undefined reference to `LNSmartPtr::DeleteBody()’
dbtitle.o(.text+0x2c6): In function `main’:
: undefined reference to `LNString::~LNString in-charge’
dbtitle.o(.text+0x2db): In function `main’:
: undefined reference to `LNString::~LNString in-charge’
dbtitle.o(.text+0x314): In function `main’:
: undefined reference to `LNNotesSession::~LNNotesSession in-charge’
dbtitle.o(.gnu.linkonce.d._ZTV10LNDatabase+0x8): undefined reference to `LNSmartPtr::DeleteBody()’
dbtitle.o(.gnu.linkonce.t._ZNK10LNSmartPtr12GetClassNameEv+0x12): In function `LNSmartPtr::GetClassName() const’:
: undefined reference to `LNGetClassName(LNCLASSID, int)’
dbtitle.o(.gnu.linkonce.d._ZTI10LNDatabase+0x8): undefined reference to `typeinfo for LNSmartPtr’
collect2: ld returned 1 exit status
make: *** [(TARGET)] Error 1
Also I cannot change the platform setup in any manner. Any help in this regard is greatly appreciated.
Thanks,
Sandeep