Operating System - HP-UX
1752834 Members
3755 Online
108789 Solutions
New Discussion юеВ

Re: Unresolved Symbol error

 
Sanjib Talukdar
Occasional Advisor

Unresolved Symbol error

All,

We have compiled and built an executable on HP UX 11.00. While running this executable we are getting the following error:
/usr/lib/dld.sl: Unresolved symbol: __shlinit (code) from /usr/lib/librwtool.2
Abort(coredump)

Can anyone please point out what the problem? Do we need to specify some library paths in SHLIB_PATH?

We used the following compiler and linkers:
what /bin/CC
/bin/CC:
HP C++ HPCPLUSPLUS A.12.14 (980921)

what /bin/ld
/bin/ld:
$Revision: 92453-07 linker linker crt0.o B.11.16.01 030316 $
HP aC++ B3910B X.03.37.01 Classic Iostream Library
HP aC++ B3910B X.03.37.01 Language Support Library
ld_msgs.cat: $Revision: 1.85 $
92453-07 linker command s800.sgs ld PA64 B.11.38 REL 031217

The following is the command line for building the executable:
CC -W l,-z -W l,-Bimmediate -W l,-Bnonfatal -W l,+s +eh -Wl,-a,archive CSTARCallBack.o CSTARDisplay.o CSTARServer.o CSTARToXdr.o ChangeOE.o RestorSvc.o ChangeLnFeat.o ChangeIntrcpt.o TransFileMgr.o tbcc.o /prod/ssi/ssi-3.18/dg/dev/lib/libDG.a /prod/ssi/ssi-3.18/dg/dev/lib/libOSSGW.a /prod/ssi/ssi-3.18/dg/dev/lib/libpwd.a /prod/ssi/ssi-3.18/dg/dev/xdr/libidl.a /prod/ssi/ssi-3.18/dg/rogue/lib/libtls0s.a -L/opt/datagate/lib -L/opt/datagate/rsa/tipemlib/hp9000/lib -lsinfra -lsclass -laclapi -lUtil -lInfra -lpksec -lTipemCS -lLLCache -ltipemutl -ltipem -ldgsnmp -lRawMsg -lMdrivers -lLinklist -lavl -lxdr -Wl,-a,default -lm -lrwtool -ldce -lndbm -ldld -lc_r -I. -I/opt/CC/include/CC -I/opt/datagate/include -I/opt/datagate/include/security -I/usr/include/reentrant -I/usr/include -I/prod/ssi/ssi-3.18/dg/rogue -I/prod/ssi/ssi-3.18/dg/dev/xdr -I/prod/ssi/ssi-3.18/dg/dev/include -I/prod/ssi/ssi-3.18/dg/dev/src/libOSSGW -I/prod/ssi/ssi-3.18/dg/dev/src/libDG -o CSTARServer-6.0.1

Thank You.
Sanjib.
4 REPLIES 4
Michael Tully
Honored Contributor

Re: Unresolved Symbol error

ranganath ramachandra
Esteemed Contributor

Re: Unresolved Symbol error

why are you using CC ? you are not supposed to. CC is obsoleted - no longer supported. you should be using aCC.

__shlInit is defined in libCsup.sl and this will be passed to the linker in the link line by aCC. so when you use aCC this will automatically be taken care of.
 
--
ranga
[i work for hpe]

Accept or Kudo

Sanjib Talukdar
Occasional Advisor

Re: Unresolved Symbol error

Michael,
Thank you for pointing to those previous discussions.
Based on my understanding, I did an explicit link with libCsup library while building the executable, but now I am getting the following error:
CC: error: could not find __perfopt_mode symbol. You must use CC to link. If your main is not in C++, a call to _main() is required. (740)
CC: error: could not find __head symbol. You must use CC to link. If your main is not in C++, a call to _main() is required. (740)
We have a main function in one of source file whose object file is CSTARServer.o and it is included in the command to build the executable.
Inspite of the above error the executable gets built.
Can anyone please provide an explanation?

Thank You.
Sanjib.
Sanjib Talukdar
Occasional Advisor

Re: Unresolved Symbol error

Thank you for your responses.
We have to use CC (and older header files and libraries) because the source code is very old and not very compatible with the current standards of type declarations and functions.
Anyway, we managed to build the executable using aCC and older headers and libraries. But we are getting segmentation fault error in Rogue Wave function calls while executing it. We had recompiled older Rogue Wave Tools library (7.0.A) on our HP UX 11.00 platform using aCC and used that to build the executable.
Any suggestions will be welcome.