Reputation: 6031
I'm asking the solution in c
, NOT command line options.
The reason I'm sure it exists is that Apache can be instructed to loaded .so
dynamically:
load modules/mod_perl.so
UPDATE
Isn't it too inefficient if I need to search with dlsym
one by one?
Upvotes: 0
Views: 76
Reputation: 120079
If you want to load your own modules dynamically, study the dlopen
/dlsym
family of functions. That's what Apache uses to load its modules. man dlopen
has all the information.
If you want to link against shared libraries, you must use linker command line options to specify where these libraries are. Otherwise your program will not be able to execute. No amount of C programming can help a program that won't even start.
Upvotes: 2