Difference between .lib file and .obj file

What is the difference between using the *.lib file and the *.Obj file?

😁

Replies

  • sherya mathur
    sherya mathur
    The .lib file is a file that has the stuff the linker needs to build your executable program. Windows cannot use them, but compilers and linkers can. Its a lot like a .obj file really, except it contains everything needed for all the stuff in your 'library' whereas an obj is from a single source file. It also contains a protocol for the associated .dll (basicaly, offsets of where functions start, the name and parameters(?) of the functions, calling conventions(?) and things like this).

    A .dll can have a lot of different stuff -- data, functions, anything really. A dll that has shared routines is what the OS needs to run those routines -- compare this to a 'mini executable'. A program smoothly jumps from its own executable statements to the ones in the .dll and back again. Windows does some smoke and mirrors here to make the file loading efficient(ish).
  • sushant005
    sushant005
    @sherya
    can you elaborate it please "It also contains a protocol for the associated .dll".
    .
    what the protocol means in that envoirnment.

You are reading an archived discussion.

Related Posts

algebraic problem This is a very silly question. You have given 8,8,3,3 . How can you make 24 by by using the above four number?
Q 1:A railway half ticket costs half the full fare and the reservation charge is the same on half ticket as on full ticket. One reserved first class ticket from...
This thread is bit too late; but better late than never. CEan MayurPathak assumed a new role of 'daddy' on April 27, 2010 😁 Congratulations to Mayur and family on...
hi can u suggest me which domain can i choose for doing final year projects....
Check out post: WeTransfer lets you send large files to your friend for free - CrazyEngineers Generally e-mail clients have boundations that we can not send attachment of more than...