Archived

This topic is now archived and is closed to further replies.

Zephyre

.so Files

Recommended Posts

Zephyre    122
Does anyone have the code to load .so files dynamically at run time for program use (IE load a compiled library with dynamic code for use in the main program)? If someone could provide this information it would be "super".

Share this post


Link to post
Share on other sites
LearFox    122
I should point out that normally .so files are not normally
loaded by code but rather just linked to a compile time.

Using code to load libraries and resolve symbols are
usually intended to be plugins. For that look at
`man dlopen'' to get you started.

I just wanted to point this out incase you are just
wanting to link to shared libraries, all you need to
do is:

cc -l mysource.c -o myprogram

Where is the name of the library''s postfix
name. For instance libm.so (the math library) you
would use -lm, and for libY2.so you would use -lY2.

Share this post


Link to post
Share on other sites
Zephyre    122
I want to load libararies at run time, so dlopen is what I want. Im well aware of compiled libraries, thanks anyway for the suggestion. Thanks again for the man page.

Share this post


Link to post
Share on other sites