Question for LIB files. 
Author Message
 Question for LIB files.

I know that there are lib (library) files used in C/C++ language. I have
never had a necessety to see a lib file content. I know that the libs are
used for contining object files those consist interpreted sources from some
cpp source files. Is there possible translating lib and obj files to cpp
files.


Sat, 01 Jan 2005 09:22:47 GMT  
 Question for LIB files.
A LIB file is little more than a series of OBJ files concatenated together.

In general, it's not possible to re-generate C++ from an OBJ or LIB file -
there's just too much semantic distance between machine language (as present
in the OBJ or LIB) and C++ for an automatic translation to be very
successful.

With a great deal of care, if you know that a particular piece of machine
language was produced by a particular C++ compiler (for example, MSVC6),
it's possible to manually re-construct a C++ source file which, when
compiled, will yield the original machine language, but doing so is
incredibly tedious, and will result in a C++ source file with probably very
similarity to the original, especially if the original source code made any
use of templates or inline functions.

If you'd like to view the machine language in an OBJ file, you can do so by
using dumpbin /disasm the_name_of_you_obj_or_lib - be warned, the output is
LONG.

-cd


Quote:
> I know that there are lib (library) files used in C/C++ language. I have
> never had a necessety to see a lib file content. I know that the libs are
> used for contining object files those consist interpreted sources from
some
> cpp source files. Is there possible translating lib and obj files to cpp
> files.



Sat, 01 Jan 2005 00:27:21 GMT  
 Question for LIB files.

Quote:
> incredibly tedious, and will result in a C++ source file with probably

very

little

Quote:
> similarity to the original, especially if the original source code made

any

-cd



Sat, 01 Jan 2005 00:36:39 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Stupid question about Lib files, PLEASE help!

2. DLL question - no .lib file when I compile

3. Differentiate LIB file for static library and LIB file for DLL

4. Problems w/LIB.EXE and link .LIB files...

5. Question about name-mangling and C lib files.

6. .lib file question

7. question about re-linking of .lib files

8. Dump Entry Points In .LIB files or .DLL Files

9. Looking for file format of LIB files

10. Linking dll files to LIB files

11. Creation of lib file from dll file

12. Using a DLL file that comes without a LIB file

 

 
Powered by phpBB® Forum Software