1834459 Members
2657 Online
110067 Solutions
New Discussion

Problem with CC

 
SOLVED
Go to solution
Alex Lavrov
Regular Advisor

Problem with CC

Hello,
I'm trying to compile an C program with 64bit,
but in the link step I get this message:

ld: Mistmatched ABI (not an ELF file) for -lclntsh
Fatal Error.

Well... maybe I'm using the wrong flag for 64bit? Or this library is not compiled for 64bit?

Thank you for your help,
Alex.
8 REPLIES 8
Stanimir
Trusted Contributor

Re: Problem with CC

Hi!
That "ABI" means the linker finds both 32-bit and 64-bit objects or shared libraries while linking. The linker picks the first object fron the command line and uses it type to determine if the executable should be 32 or 64-bit. On the first object or shared library that is not of same type, ld reports an error like above.

Regards,Stan
T G Manikandan
Honored Contributor

Re: Problem with CC

Did you use the option +DA2.0W?

try using this option during the final compilation and linking.

Revert

Alex Lavrov
Regular Advisor

Re: Problem with CC

hi,
I'm using this flag to compile my obejcts,
so all of my objects are 64bit, probably this library -lclntsh is not 64bit.

What can I do now to make it link with my objects?

Alex
Stanimir
Trusted Contributor

Re: Problem with CC

Hi!
1. Ensure, that 64-bit libclnsh.* is really
missed on your system.

2. Use related patch PHSS_* - from hp.com
or other relatd place

Regards,
T G Manikandan
Honored Contributor

Re: Problem with CC

I think you are doing something with the Oracle libraries and sl's.

Then you should look at the object files LIBRARY_PATH or SHLIB_PATH at $ORACLE_HOME/lib64
Ravi_8
Honored Contributor

Re: Problem with CC

Hi alex

1. To produce optimized code use '+DAportable' on the command line.
or
2. Turn off the warning in the linker with the '+vanocompat' option set to 'ld'.
never give up
Ian Lochray
Respected Contributor
Solution

Re: Problem with CC

What version of Oracle are you using? Loks like you are linking with the 32-bit libclntsh. DOes your Oracle installation include a 64-bit version?
Alex Lavrov
Regular Advisor

Re: Problem with CC

It is an oracle 32bit library .... We do not use 64bit oracle. Well, I'll look for other solutions for solving shared memory problem with 32bit programs, probably I'll use memwindow.

Thanx all for your help !!!