locked
Extracting lib file RRS feed

  • Question

  • Hi to everyone.

    I have one lib file but don't have the coding for it.  I have to extract the coding from the lib file.

    How to do it?

    Thanks in advance for the reply.

    Wednesday, August 18, 2010 11:24 AM

Answers

  • Like I said,you can not read code from a Library.Orelse try to be more clear/specific of what you are trying to do.

    Please "mark as answer" if you find my answer useful to you,hence it would be helpful for other who have the same type of problem. thank you, with regards, Rakesh SR
    • Proposed as answer by Jesse Jiang Tuesday, August 24, 2010 2:13 AM
    • Marked as answer by Jesse Jiang Wednesday, August 25, 2010 1:16 AM
    Wednesday, August 18, 2010 1:27 PM
  • I have to read the code from that library.
    It's a static lib only.

    You would have to disassemble it, then figure out the C code from assembly.
    For that you need a good disassembler, know a lot about assembly,
    C calling conventions, lots of patience.

    Not impossible, but not a trivial task,
    If you are asking this question here you are probably no up for it
    (sorry, no disrespect, just trying to save you some time)

    -- Mihai Nita [Microsoft MVP, Visual C++]
    http://www.mihai-nita.net
    ------------------------------------------
    Replace year with _ to get the real email

    • Proposed as answer by Jesse Jiang Tuesday, August 24, 2010 2:13 AM
    • Marked as answer by Jesse Jiang Wednesday, August 25, 2010 1:16 AM
    Monday, August 23, 2010 7:23 PM

All replies

  • Hello,

    it is not very clear...

    your lib is a static library and you want to use it ?

    if so, just get a header for your lib, use #include with your header and add the lib to your project link options.

    note: if you mean extracting  the source code from a lib if it's not possible...

     

     


    Christophe Pichaud
    Wednesday, August 18, 2010 12:16 PM
  • You cannot extract code from n Dll or Lib file,but you can use the functions that are exported in the Dll or lib.

    Please "mark as answer" if you find my answer useful to you,hence it would be helpful for other who have the same type of problem. thank you, with regards, Rakesh SR
    Wednesday, August 18, 2010 12:16 PM
  • Thanks for the reply.

    I have to read the code from that library.

    It's a static lib only.

    Wednesday, August 18, 2010 12:19 PM
  • Like I said,you can not read code from a Library.Orelse try to be more clear/specific of what you are trying to do.

    Please "mark as answer" if you find my answer useful to you,hence it would be helpful for other who have the same type of problem. thank you, with regards, Rakesh SR
    • Proposed as answer by Jesse Jiang Tuesday, August 24, 2010 2:13 AM
    • Marked as answer by Jesse Jiang Wednesday, August 25, 2010 1:16 AM
    Wednesday, August 18, 2010 1:27 PM
  • I have to read the code from that library.
    It's a static lib only.

    You would have to disassemble it, then figure out the C code from assembly.
    For that you need a good disassembler, know a lot about assembly,
    C calling conventions, lots of patience.

    Not impossible, but not a trivial task,
    If you are asking this question here you are probably no up for it
    (sorry, no disrespect, just trying to save you some time)

    -- Mihai Nita [Microsoft MVP, Visual C++]
    http://www.mihai-nita.net
    ------------------------------------------
    Replace year with _ to get the real email

    • Proposed as answer by Jesse Jiang Tuesday, August 24, 2010 2:13 AM
    • Marked as answer by Jesse Jiang Wednesday, August 25, 2010 1:16 AM
    Monday, August 23, 2010 7:23 PM