Thread: wrong ELF class: ELFCLASS64

  1. #16
    Registered User
    Join Date
    Mar 2009
    Posts
    12
    How do I do that??

    gcc -o PROG1 PROG1.c PROG2.c PROG3.c -L /usr/orasys/9.2.0.6/lib -lclntsh -m64 ???

  2. #17
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Quote Originally Posted by noviC View Post
    How do I do that??

    gcc -o PROG1 PROG1.c PROG2.c PROG3.c -L /usr/orasys/9.2.0.6/lib -lclntsh -m64 ???
    That's exactly how you do that. (That's how it will look when you get $(OBJS) working properly, too.)

  3. #18
    Registered User
    Join Date
    Mar 2009
    Posts
    12
    Doesn't work like that!

  4. #19
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Quote Originally Posted by noviC View Post
    Doesn't work like that!
    What doesn't work like what?

  5. #20
    Registered User
    Join Date
    Mar 2009
    Posts
    12
    I meant to say that the code is still not compiling like :

    gcc -o PROG1 PROG1.c PROG2.c PROG3.c -L /usr/orasys/9.2.0.6/lib -lclntsh -m64

    and if I try to compile the PROG2.c separately it also fails...it does not have any dependency.

  6. #21
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Run objdump on your objects to verify that they are 64-bit. Run objdump on the Oracle client library to verify that it is 64-bit.

    The original ELFCLASS64 message was reported for the client library, so the client library is 64-bit. The conflict must be with your stuff.

    If the client library is 64-bit, and your objects are 64-bit, then I suspect you may have a bad installation of gcc which is not linking the correct runtime, or the wrong copy of crt1.o or some such thing.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  7. #22
    Registered User
    Join Date
    Mar 2009
    Posts
    12
    ksh: objdump: not found

  8. #23
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    For this purpose the "file" command would probably also work.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Class design problem
    By h3ro in forum C++ Programming
    Replies: 10
    Last Post: 12-19-2008, 09:10 AM
  2. Message class ** Need help befor 12am tonight**
    By TransformedBG in forum C++ Programming
    Replies: 1
    Last Post: 11-29-2006, 11:03 PM
  3. structure vs class
    By sana in forum C++ Programming
    Replies: 13
    Last Post: 12-02-2002, 07:18 AM
  4. Warnings, warnings, warnings?
    By spentdome in forum C Programming
    Replies: 25
    Last Post: 05-27-2002, 06:49 PM
  5. class member access denied
    By chiqui in forum C++ Programming
    Replies: 2
    Last Post: 05-27-2002, 02:02 PM