Wrong ELF Class: ELFCLASS64

This is a discussion on Wrong ELF Class: ELFCLASS64 within the solaris forums in Operating Systems category; Rookie here: I am trying to compile my softare using cc -o myprog obj1.o obj2.o -lc -lcurses. I believe that my problem is being cause by the 32-bit curses library. Is there a 64-bit curses library? If there is, where is it usually located? If only a 32-bit curses library exist, then I will have to compile my program in 32-bit mode only. John...

Go Back   Database Forum > Operating Systems > solaris

Database Forums

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-27-2008, 02:10 PM
Default Wrong ELF Class: ELFCLASS64

Rookie here:

I am trying to compile my softare using cc -o myprog obj1.o obj2.o -lc
-lcurses.

I believe that my problem is being cause by the 32-bit curses library.
Is there a 64-bit curses library?
If there is, where is it usually located?
If only a 32-bit curses library exist, then I will have to compile my
program in 32-bit mode only.

John
Reply With Quote
  #2  
Old 08-27-2008, 02:23 PM
Default Re: Wrong ELF Class: ELFCLASS64

On Wed, 27 Aug 2008 10:10:16 -0700, John wrote:

> I am trying to compile my softare using cc -o myprog obj1.o obj2.o -lc
> -lcurses.
>
> I believe that my problem is being cause by the 32-bit curses library.
> Is there a 64-bit curses library?


Yes

> If there is, where is it usually located?


On SXCE-b96, /lib/64 but there are symlinks in /usr/lib/64. You don't
have to specify the location since ld and ld.so.1 know how to find 64 bit
libraries.

> If only a 32-bit curses library exist, then I will have to compile my
> program in 32-bit mode only.


If your program is 64-bit ready then add the compile argument -m64;

cc -m64 -o myprog ....

But your obj1.o and obj2.o will also have to be 64 bit.

To build only 32 bit objects, use -m32.

Reply With Quote
  #3  
Old 08-27-2008, 02:52 PM
Default Re: Wrong ELF Class: ELFCLASS64

On Wed, 27 Aug 2008 12:23:47 -0500, Dave Uhring
wrote:

>On Wed, 27 Aug 2008 10:10:16 -0700, John wrote:
>
>> I am trying to compile my softare using cc -o myprog obj1.o obj2.o -lc
>> -lcurses.
>>
>> I believe that my problem is being cause by the 32-bit curses library.
>> Is there a 64-bit curses library?

>
>Yes
>
>> If there is, where is it usually located?

>
>On SXCE-b96, /lib/64 but there are symlinks in /usr/lib/64. You don't
>have to specify the location since ld and ld.so.1 know how to find 64 bit
>libraries.
>
>> If only a 32-bit curses library exist, then I will have to compile my
>> program in 32-bit mode only.

>
>If your program is 64-bit ready then add the compile argument -m64;
>
>cc -m64 -o myprog ....
>
>But your obj1.o and obj2.o will also have to be 64 bit.
>
>To build only 32 bit objects, use -m32.


Thanks, I got it to compile and link. Now all I have to do is get
ncurses (initialization) to work correctly.
Reply With Quote
Reply


Thread Tools
Display Modes



All times are GMT -4. The time now is 04:15 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Integrated by bbpixel2008 :: jvbPlugin R1013.368.1

Search Engine Friendly URLs by vBSEO 3.1.0
vB Ad Management by =RedTyger=
In an effort to better serve ads to our visitors, cookies are used on Mydatabasesupport.com. For more information, check out our Privacy Policy.