Archived

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

avianRR

dynamic load librarys?

Recommended Posts

avianRR    100
Does anyone know how to create and use librarys that can be specified and loaded at run time like a windows .dll? The project I''m working on needs an expandability mechanism and I was thinking that just adding another library in the program directory and then loading it at run time would be the best. However I can''t find any info on how to do this in linux. Thanks, Rob

Share this post


Link to post
Share on other sites
Saai    122
man dlopen

http://www.linuxdoc.org/HOWTO/Program-Library-HOWTO/index.html

next time before you post look through your man pages and linuxdoc.org

saai

Share this post


Link to post
Share on other sites
avianRR    100
It''s kinda hard to get the man page for dlopen when I didn''t know the function name. And I can''t search linuxdoc.org if I never herd of it before your post! So lose the attitude it''s cost you your thanks for the help response!

Share this post


Link to post
Share on other sites
LearFox    122
Just a point to reassure clarity, if you just
want to use a library (at startup/link time) you
can just add a -l to the compiler, ie if you
wanted to load the math library (libm) you
would use the argument -lm (note the omitted lib prefix).

The kind of run time libraries used with dlopen() are
commonly used as plug-ins, this is a rare case and
only two of our game projects ever needed it.

Share this post


Link to post
Share on other sites
avianRR    100
quote:
Original post by LearFox
The kind of run time libraries used with dlopen() are
commonly used as plug-ins, this is a rare case and
only two of our game projects ever needed it.



My program is designed to be expandable with plugins so I need this functionality. Thanks.

Share this post


Link to post
Share on other sites
Saai    122
excuse me, i gave you two sources of information followed up by a suggestion to check those sources again next time you need help and ended with a smiley face. no attitude intended.

saai

Share this post


Link to post
Share on other sites
avianRR    100
quote:
Original post by Saai
excuse me, i gave you two sources of information followed up by a suggestion to check those sources again next time you need help and ended with a smiley face. no attitude intended.

saai


actually you said

quote:
Original post by Saai
next time before you post look through your man pages and linuxdoc.org



And taking into account that I was probably in a bad mood that day.
l8r

Share this post


Link to post
Share on other sites