gcc error: wrong ELF class: ELFCLASS64

后端 未结 5 1658
轻奢々
轻奢々 2020-12-17 08:51

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 compile

5条回答
  •  鱼传尺愫
    2020-12-17 09:09

    You can specify '-m32' or '-m64' to select the compilation mode.

    When dealing with autoconf (configure) scripts, I usually set CC="gcc -m64" (or CC="gcc -m32") in the environment so that everything is compiled with the correct bittiness. At least, usually...people find endless ways to make that not quite work, but my batting average is very high (way over 95%) with it.

提交回复
热议问题