"Paramesh" <ce*********@gmail.com> wrote
Hello friends,
How can i create and use dynamic link libraries with ANSI or ISO C
language?
Thank You,
To use a dynamic library, just the straight
#include <ordinarytheader.h>
int main(void)
{
ordinaryfunctioncall();
return 0;
}
Then you need to link the dynamic library, possibly the compiler will do
this automatically, or possibly you will need to specify it explicitly.
To make a dynamic library, just the standard
int ordinaryfunctioncall(void)
{
return 123;
}
Now compile, using switches to indicate that the function should not be
compiled to a standard executable, but to a dynamic library. You will
virtually always need to inform the compiler explictly about this (in MSVC++
it is achieved by clicking the "dynamic link library option" as you create a
new project, other compilers might use command line switches or other
methods).