How to create shared objects and how are they useful
hi all,
i want to create a .so of myfile.c, then dynamically while program is running, i want this .so to be linked or unlinked as per needs. Is there any way do to this. Please help me as soon as possible. thanks in advance. |
this forum is primarrly for saying hi,
thsi woudl be better suited in the programming forum |
Moved: This thread is more suitable in Programming and has been moved accordingly to help your thread/question get the exposure it deserves.
|
|
Is the question also included 'how to create dynamic link library'? If so, this is answer.
To create share library or dynamic link library do as follow. I also include description taking from 'man gcc' for time-saving too. Create ddl: Code:
#gcc -c -fPIC mydev.c -o mydev.o Code:
#gcc mynewdev.c libmydev.so Ref Quote:
Create static link library: Code:
#gcc -c mydev.c -o mydev.o Code:
#gcc -static mynewdev.c -lmydev |
All times are GMT -5. The time now is 02:54 AM. |