Board index » kylix » How to make a shared object from a lib?

How to make a shared object from a lib?


2004-01-12 02:10:41 AM
kylix1
Hi,
I have a static lib, staticlib.a.
I have a header file for the lib, staticlib.h.
I have some examples in C standard, and I can compile them w/o problems.
Now, is there an easy solution to compile the static lib to make a shared
object so I can access it from Delphi?
TIA
-ioan
 
 

Re:How to make a shared object from a lib?

Ioan Ghip wrote:
Quote
Hi,

I have a static lib, staticlib.a.
I have a header file for the lib, staticlib.h.
I have some examples in C standard, and I can compile them w/o problems.

Now, is there an easy solution to compile the static lib to make a shared
object so I can access it from Delphi?

TIA
-ioan
You could try...
ld --whole-archive -shared -o dynamiclib.so.1 staticlib.a
ln -s dynamiclib.so.1 dynamiclib.so