Jump to content
Timelord

Compliare C in linux

Recommended Posts

Am de compilat 2 fisiere obiect(.o) impreuna pentru a creea un executabil in linux cu ajutorul gcc,dar sunt cam noob si nu reusesc.Versiunea de linux e ubuntu pe 64,iar eroare pe care o primesc cand execut comanda gcc fisier1.o fisier2.o -o executabil este:

i386 architecture of input file 'executabil' is incompatible with i386:x86-64 output

Am incercat sa adaug si -m32,nu a ajutat...Idei?

Link to comment
Share on other sites

  • Active Members

Nu poti combina un file object de 32-bit cu unu' de 64.

Compilatorul iti spune clar ca unul din object file-urile tale e compilat ca un obiect de 32-bit asa ca nu poate fi linkat intr-un executabil de 64-bit.

Trebuie sa recompilezi object-file-ul de 32-biti sau ala de 64 folosind flagul -m32

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...