Undefined first referenced symbol in file (ld: fatal: symbol referencing errors)

34 views Asked by At

I have these 3 functions Which I converted it into templatized version to make it more generic.

#ifndef __CPPMARSH_H__
#define __CPPMARSH_H__


template<typename listT>
void cppListFromWire(void *&src,listT &dest, factorywv);
void cppListToWire(listT &src, void *&dest);
long cppListToWireSize(listT &list);

Defined in a different folder (not as in where I declared) as below,

template<typename listT>
void cppListToWire(listT &list, void *&dest)
{
        int nItems = (int) list.entries();
        cppIntToWire(&nItems, dest);
        //RWSlistIterator next(list);
        RWTValSlist<void *> next(list);
        while (next())
                ((AISObject*)next.key())->toWire(dest, 0);
}

But facing the below issue.Here RWTValSlist is a sourcePro library function,

Undefined                       first referenced
 symbol                             in file
void cppListToWire<RWTValSlist<CSSCODERec*, std::allocator<CSSCODERec*> > >(RWTValSlist<CSSCODERec*, std::allocator<CSSCODERec*> >&, void*&) /app/sdasup/home/mhp/source/develop/sd/lib/libsdHostSupport.so
long cppListToWireSize<RWTValSlist<CSSCODERec*, std::allocator<CSSCODERec*> > >(RWTValSlist<CSSCODERec*, std::allocator<CSSCODERec*> >&) /app/sdasup/home/mhp/source/develop/sd/lib/libsdHostSupport.so
void cppListFromWire<RWTValSlist<CSSCODERec*, std::allocator<CSSCODERec*> > >(void*&, RWTValSlist<CSSCODERec*, std::allocator<CSSCODERec*> >&, AISObject* (*)()) /app/sdasup/home/mhp/source/develop/sd/lib/libsdHostSupport.so
ld: fatal: symbol referencing errors

These are the different methods I tried to resolve but in vain,

  1. Tried prototyping the function

  2. Tried including the flags under makefile ROGUEFLAGS=-lsdHostSupport ROGUELIBS=lsdHostSupport

  3. export LD_LIBRARY_PATH=/opt/RogueWave/SourcePro/2021/rw/ For this method though it clears the errors but throws the following eror,

3a. ld.so.1: buildserver: fatal: libtux.so.71: open failed: No such file or directory ----To mitigate this one I tried " ldd /opt/tuxedo/tuxedo12.2.2.0.0/lib/libtux.so.71" which didn't work.

Any help amounts to great appreciation.

0

There are 0 answers