Operating System - HP-UX
1820892 Members
3892 Online
109628 Solutions
New Discussion юеВ

I have a problem with C developer??

 
fuqiang
Occasional Advisor

I have a problem with C developer??

I have a rx4640. When I want to compile a hello program , It report as follow.

missmatch ABI not are ELF file for -LC LIBC.A

11 REPLIES 11
Andrew Merritt_2
Honored Contributor

Re: I have a problem with C developer??

If you could give the command you gave to compile it, and the exact error message you got it might help someone to give an answer to your question. If you can cut and paste both of those it would help; there are definitely some typos in the error message you have typed in.

Have you compiled anything successfully on this system? Has anyone else?

One suggestion is that you may be including '-lc' on the compile line. I don't think you need to do that, it is implied, normally.

What other flags or options are you using? Is +DD64 set either on the command line or in CFLAGS? This would mean you are building a 64 bit application, and I think -lc would try to pick up the 32 bit library by default, which would lead to an error like the one you are reporting, but without more data I'm just guessing.

Andrew
fuqiang
Occasional Advisor

Re: I have a problem with C developer??

What other flags or options are you using? Is +DD64 set either on the command line or in CFLAGS? This would mean you are building a 64 bit application, and I think -lc would try to pick up the 32 bit library by default, which would lead to an error like the one you are reporting, but without more data I'm just guessing.

If I want to set +DD64 either on the command line or in CFLAGS, how can I do this operation??
Vibhor Kumar Agarwal
Esteemed Contributor

Re: I have a problem with C developer??

There are 2 situations:

Either there is something wrong in giving the path via -L option that's why it says not ELF.

Or you are linking wrong files 32-64 or vice versa.

It will be helpful if you can give your code snippet.
Vibhor Kumar Agarwal
Vibhor Kumar Agarwal
Esteemed Contributor

Re: I have a problem with C developer??

Are you doing this via makefile or directly via command line.

Give the link line.
Vibhor Kumar Agarwal
Alex Lavrov.
Honored Contributor

Re: I have a problem with C developer??

Try this:

cc -o test hello_program.c


Alex.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
fuqiang
Occasional Advisor

Re: I have a problem with C developer??

I can use /usr/ccs/bin/cc command to compile my program .

HP engineer told me that I had installed a PA system C compiler in a Itanium system,but I remembered I had installed a IA C compiler .
fuqiang
Occasional Advisor

Re: I have a problem with C developer??

How can I link my program to 64 bit library??
Andrew Merritt_2
Honored Contributor

Re: I have a problem with C developer??

Fugiang,
Please give the full command line you are using to try to compile the program, and the exact error message you are seeing.

Without that we cannot help you.

Andrew
Vibhor Kumar Agarwal
Esteemed Contributor

Re: I have a problem with C developer??

You don't need to link to 64 bits.

It will automatically do.
The system libraries are present in LD_LIBRARY_PATH.

Now if you generate a 32 bit program you will get linked to 32 bit libraries and the same for 64.

You just have to mention that you are making a 64 bit application. I dont' remember that tag right now.
Vibhor Kumar Agarwal
fuqiang
Occasional Advisor

Re: I have a problem with C developer??

In fact ,It is a problem of my customer, and I can not work with that rx4640.So my message is provided by my customer.
Andrew Merritt_2
Honored Contributor

Re: I have a problem with C developer??

> In fact ,It is a problem of my customer,
> and I can not work with that rx4640.So
> my message is provided by my customer.

Ok, I understand, but you need to get the full information from them in order to solve the problem. If they want you to find the answer they have to tell you what they are doing.

Certainly one cause of the message is attempting to link 64 and 32 bit modules. Establishing exactly what your customer is doing is the quickest way of deducing what is wrong.

Andrew