10 Years
Discussion Span
Last Post by John A

but why?

Probably because of the way in which the object file is generated from the source file...

The actual C / C++ source code goes thorough a lot of transformations and platform specific optimizations during its compilation and building phase which make the source code from the object file to be retrieved almost impossible.


There are some applications whose developers claim can (in some cases) retrieve a C - like representation of the original source from a .exe file. It is generally believed that reverse compilation of 3rd level languages is difficult bacause there may not always be a one to one mapping between source and compiled binary. It is certainly impossible to retrieve C++ code from a .exe because all class structures are thrown away before the binary is produced.



Assembly on the other hand, can be disassembled fairly easily from an executable because it's so low-level. Java is also very easy to decompile; you can get almost an exact replica of the original source code if you run it through a decompiler because it's only compiled to bytecode.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.