0

I'm a beginner in programming, I wonder what is inside the .o files and want to see it, but can't open the files in windows because they give some output with unrecognized symbols. Please suggest something !

2
  • You don't open seem ;-) see full response in the linked answer above. Welcome to stack overflow ! Commented Aug 8, 2019 at 6:30
  • I think this will answer your question. stackoverflow.com/questions/2186246/what-is-o-file Commented Aug 8, 2019 at 6:30

1 Answer 1

6

They are object files, produced by the compiler, which the linker will combine into an executable.

They are not intended to be human readable.

Sign up to request clarification or add additional context in comments.

5 Comments

Depending on the compiler system you are using, there might be tools that can show you some of the information in an object file in a human readable form. For GCC it is objdump, for example.
can't we open them anyway, just to see what's inside of those .o files
Yes, you can, but you are unlikely to understand the contents. Give it a try
I did open it and saw some unreadable format using certain special characters etc, but why is it that we can't read the code moreover if this is the code that our cpu understands then why isn't it in 0s and 1s because that's what our computers understand
It is in ones and zeros. Try looking in a hex editor, although ever then you will only byte by byte, rather than bit by bit.. But your CPU doesn't look at it bit by bit either, probably in chunks of 64 bits.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.