Re: Relationship.....
- From: "Arnaud Debaene" <adebaene@xxxxxxxxxxxxxxxx>
- Date: Tue, 26 Sep 2006 20:22:24 +0200
"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.
and our program code.
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
.
- References:
- Relationship.....
- From: Jawad Rehman
- Relationship.....
- Prev by Date: Re: Why Win64 (x86_64) executable has more footprint than Win32?
- Next by Date: Re: Relationship.....
- Previous by thread: Relationship.....
- Next by thread: Re: Relationship.....
- Index(es):
Relevant Pages
|
Loading