I was trying to compile a program using an external compiled object coreset.o. I wrote the public01.c test file and my functions are in computation.c, both of which compiles. However its failing on linking it together. What might be the problem?
gcc -o public01.x public01.o computation.o coreset.o ld: fatal: file coreset.o: wrong ELF class: ELFCLASS64 ld: fatal: File processing errors. No output written to public01.x collect2: ld returned 1 exit status
I think that coreset.o was compiled for 64-bit, and you are linking it with a 32-bit computation.o.
You can try to recompile computation.c with the '-m64' flag of gcc(1)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With