The issue is search path. I normally feed absolute paths into DSO to make
sure the correct DSO image is loaded. If you build a try-catch handler to catch DSO *, you can print the error message you are getting. If you have no catch handler, and the DSO fails, it sends a SIGABRT.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
what i do:
t.h:
class T : public DSO{
public:
T(char *filename):DSO(filename){}
virtual ~T(){}
virtual void doit(){}
};
derived.cpp
class Derived : public T{
public:
Derived(char *filename):T(filename){}
virtual ~Derived(){}
virtual void doit(){cout << " derived ..." << endl;}
};
main.cpp:
main(){
T *=new T("derived.so");
}
it s make a core dump,if someone can help me
The issue is search path. I normally feed absolute paths into DSO to make
sure the correct DSO image is loaded. If you build a try-catch handler to catch DSO *, you can print the error message you are getting. If you have no catch handler, and the DSO fails, it sends a SIGABRT.