Forum Stats

  • 3,838,671 Users
  • 2,262,392 Discussions
  • 7,900,730 Comments

Discussions

ld: fatal: file test.o: wrong machine class

807578
807578 Member Posts: 13,959 Green Ribbon
I have WS Pro 5.0 installed on a Solaris SPARC 2.7 64 bit Ultra system. I am trying to compile a c program called "test.c". I compile test.c with the following flags "-c -xarch=v9". From my understanding, the "-xarch=v9" is the flag to use for a 64 bit application. The initial compilation produces no errors or problems. Next I attempt to create the final executable by running: "cc test.o -o testing". The error message I receive is "ld: fatal: file test.o: wrong machine class".
I have been looking around to determine what the problem is but am unsure. I verified the kernel is 64 bit by running "isainfo -v" which returns the 64 bit value. Does anyone know what the story is here? I have not found anything by searching on the web site. Any help would be greatly appreciated. Thanks in advance.

Comments

This discussion has been closed.