dynamic load librarys?

Started by
5 comments, last by avianRR 22 years, 8 months ago
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
------------------------------Piggies, I need more piggies![pig][pig][pig][pig][pig][pig]------------------------------Do not invoke the wrath of the Irken elite. [flaming]
Advertisement
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
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!
------------------------------Piggies, I need more piggies![pig][pig][pig][pig][pig][pig]------------------------------Do not invoke the wrath of the Irken elite. [flaming]
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.
Tara Milana - WP Entertainmenthttp://wolfpack.twu.net/Comp graphics artist and programmer.
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.
------------------------------Piggies, I need more piggies![pig][pig][pig][pig][pig][pig]------------------------------Do not invoke the wrath of the Irken elite. [flaming]
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
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
------------------------------Piggies, I need more piggies![pig][pig][pig][pig][pig][pig]------------------------------Do not invoke the wrath of the Irken elite. [flaming]

This topic is closed to new replies.

Advertisement