Operating System - HP-UX
1832861 Members
3013 Online
110048 Solutions
New Discussion

Re: compile ansi-c 64 bits

 
Emilio Salcedo
New Member

compile ansi-c 64 bits

hello.
please help me, someone know how compile(in 64 bits mode) a Ansi-C program using XDK(xml).
Server’s data:
Hp-ux 11i
Oracle 8.1.7.4
Ansi-C


The compiling line using 32 bits is:
cc -o mc_lectura mc_lectura.c -I/oracle8.1.7.4/app/oracle/product/8.1.7/xdk/c/parser/include -L/oracle8.1.7.4/app/oracle/product/8.1.7/lib -lxml8 -lcore8 -lnls8 -lcore8 -lnls8 -lnsl -lclntsh -lm –lpthread

but when I try to compile in 64 bits, this message appears:
ld: mismatched ABI(not an ELF file) for –lxml8.

The compiling line using 64 bits is:
cc +DA2.0w -o mc_lectura mc_lectura.c -I/oracle8.1.7.4/app/oracle/product/8.1.7/xdk/c/parser/include -L/oracle8.1.7.4/app/oracle/product/8.1.7/lib -lxml8 -lcore8 -lnls8 -lcore8 -lnls8 -lnsl -lclntsh -lm –lpthread

thanks
3 REPLIES 3
Vibhor Kumar Agarwal
Esteemed Contributor

Re: compile ansi-c 64 bits

I don't think you have given the whole link line
There are 2 possibilities:

You have missed something in the link line that's why it gives "Not an ELF file"

You are linking some 32 bit libraries.
Vibhor Kumar Agarwal
H.Merijn Brand (procura
Honored Contributor

Re: compile ansi-c 64 bits

is there a subdirectory under $ORACLE_HOME where the 64bit versions of the libraries reside? You will have to include that with the -L flag or with $SHLIB_PATH

You cannot mix 32 and 64bit libs and objects, and - unlike on AIX - libraries cannot contain both (and I am *very* happy with that decision)

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Peter Godron
Honored Contributor

Re: compile ansi-c 64 bits

Emilio,
I would agree that you are trying to use a 32-bit lib. Can you try:
goto the library directory
file *
and ensure all libs to be used are 64-bit compiled themselves.