Forum: Compiler & IDEs was sind *.o und *.a files und wo ist der Unterschied?


von dennis (Gast)


Lesenswert?

Hi,
der Betreff ist schon die ganze Frage. Was sind *.o und *.a Files? Was
machen die? Wo ist der Unterschied?

gruss
dennis

von Hegy (Gast)


Lesenswert?

*.o Files sind Object-Files, also der Quellcode uebersetzt/compiliert.
*.a sind ar Archive, eine Ansammlung von *.o files.

# welche Files sind im liby.a?
$ ar -t liby.a
main.o
yyerror.o

# identifiziere liby.a, main.o und yyerror.o
$ file liby.a main.o yyerror.o
liby.a:    current ar archive
main.o:    ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV),
not stripped
yyerror.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV),
not stripped

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.