// ...void * _h = dlopen(some_dir, lazy);
if (!_h)
const char * _e = dlerror();// ...
_e = "Service Unavailable"... What does it mean ?
System ?
Is It important ?
Can appear and it is important. Check up, whether is in system ld.so.1 and whether it is accessible. And test up call dlopen with direct path to lib:
dlopen( "path/name", RTLD_LAZY );NOTE: It SunSolaris syntax.
void * _hw = dlopen("abs path to libm.so & some other so's", RTLD_LAZY);if (!_hw) const char * _er = dlerror();
_er = "service unavailable". what's the trouble?
Completely not clear situation. We read man:
$ man dlerror
Reformatting page. Wait... done
Miscellaneous Library Functions dlerror(3X)
NAME
dlerror - get diagnostic information
SYNOPSIS
cc [ flag ... ] file ... -ldl [library ...]
#include <dlfcn.h>
char *dlerror(void);DESCRIPTION
dlerror() is one of a family of routines that give the user direct access to the dynamic linking facilities. (See Linker and Libraries Guide). These routines are made available via the library loaded when the option -ldl is passed to the link-editor.
VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
Note: These routines are available to dynamically-linked processes ONLY.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Here it is told, that THESE ROUTTINES ARE accessible, if the module is linked for DSO execution.
DIAGNOSIS:
1. If at link's keys -ldl were specified and
2. ld.so.1 on a place
I DO NOT KNOW that it can be.
Sorry.
-static prevents from loading any 'so'... easy & perfect... but thank u at all