Re: Relationship.....



"Jawad Rehman" <jawadsmail@xxxxxxxxx> a écrit dans le message de news:
1159294155.539599.153730@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi...

What is relation b/w #include<windows.h> or etc directive,
the dll files which are linked with compilers.iam using visual studio
visual C++ IDE.
e.g

project ->settings->Link Tab...
Here we have gdi32.dll,kernal32.dll etc.

When you #include a header file, it's content is put in place of the
#include by the preprocessor, so what the compiler really see is the
concatenation of all the #included headers and the source file.
Now, the headers just contains *declarations* of functions. The declaration
just says "there is somewhere a function named XXX wich has this specific
signature". This allows the compiler to generate code that can *call* those
functions.

Now, the *body* (ie, the actual implementation code) of the functions need
to be somewhere : it is either in your code for the functions you write
yourself, either in libraries (kernel32.lib, gdi32.lib) for system-defined
functions. Those are what you feed the linker with.
Actually, libraries can be either static or dynamic.
- Static libraries are big .lib files which contains actual binary code. The
linker copies the necessary code inside your exe when building it.
- Dynamic libraries are a pair of a .lib and .dll files. The binary code is
in the dll file (which must be present on the target system for the program
to run), while the.lib file is just a stub which indicates to the linker
that the implementation should be looked for in a DLL, at runtime (and not a
link time - which is why this process is somtime called "late binding").

Arnaud
MVP - VC



.



Relevant Pages

  • Re: implicit loading of dll ?
    ... You can tell if extern ... "C" is going to help by whether the function the linker can't find is called ... input header files and external dependency libraries. ... I have a thrid party library with header file, lib and dll files. ...
    (microsoft.public.windowsce.app.development)
  • Re: What is .NET Framework 2.0.50727?
    ... The .Net framework is a collection of DLL files that are the 'runtime' ... chosen to create using these libraries. ... So it is just a huge runtime set of files. ...
    (microsoft.public.windowsxp.basics)
  • Re: Relationship.....
    ... the dll files which are linked with compilers.iam using visual studio ... Those are what you feed the linker with. ... libraries can be either static or dynamic. ...
    (microsoft.public.vc.language)
  • Re: linking libraries
    ... the compiler came with not only those DLL files, ... two libraries when it built the application. ... the DLL files in the LIBPATH, ...
    (comp.os.os2.programmer.misc)
  • Re: RT Error 713
    ... try to get a list of the referenced libraries. ... Project/References menu item in VB6 and see which DLL files are referenced. ... >> Best way to determine is to check a list of the files in a references of ... >> some sort of debug messages in a code and see where it happens. ...
    (microsoft.public.vb.database.ado)

Loading