How would you create shared and dynamic libraries?

Showing Answers 1 - 4 of 4 Answers

zahoorahmad

  • Apr 12th, 2006
 

Well shared libraries have 2 types

1) Static

2) Dynamic.

u can create library  by

ar cr -o sharedobj.a file1.o file2.o

while file1 and file2 are headfiles (obj)

now put this sharedobj.a into /usr/lib directory

  Was this answer useful?  Yes

Mohammad Omar

  • Jan 29th, 2007
 

Static libraries can be created as:::gcc -c -Wall a.cgcc -c -Wall b.car -cru libmyrand.a a.o b.oshared libraries can be created as::::gcc -fpic -c a.cgcc -fpic -c b.cgcc -shared a.o b.o -o libmyrand.so

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions