Hello,

I'm trying to figure out what a .o, .exe and .dll files are.

Lets assume I have a very basic program that just has one .cpp file without any includes, which then gets compiled into a .o by the compiler. What's the difference between this example .o file and an .exe file?

Lets assume I have a basic .dll which just has one .cpp and no extra includes, what's the difference between such an example .o and a .dll?

I suppose my question can be summarised to what does the linker do exactly that the compiler does not in such a simple case?

In more complex cases where various includes are involved, I can only imagine it simply copies and pastes the various files into one big one.

At the end of the day, a .dll a .exe and a .o file are machine code no?