This Repository includes programs of Arrays, Digits, Numbers, Strings, Data structures, etc., and their own dynamic and static libraries in Windows and Linux OS.
- For programs that require multiple libraries, shared libraries can reduce the memory footprint of the program.
- This is because multiple program can use shared library simultaneously.
- Therefore only one library is needed in the memory at a time.
- Internally in linux os the application is invoking and Myexe and linking an ELF image.
- Kernel begins the process of loading the ELF image.
- Internally DLL's address is returned and to capture that function pointers are used.
Linux DLL compilation command :-
- gcc -c -fpic sharedfileLL (name).c
- gcc -shared -o library3.so (library file name as per code) sharedfileLL.o (name of output file)
- gcc clientLL.c (name of client) -rdynamic -o Myexe
- ./Myexe
Windows DLL compilation command :-
- gcc -shared -o sharedfile.dll sharedfile.c
- gcc -o Myexe client.c
- Myexe