This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Need help with dynamic_cast across shared libraries with gcc 3.2.3.
- From: "Yuly Novikov" <novikov_yuly at hotmail dot com>
- To: gcc at gcc dot gnu dot org, gcc-help at gcc dot gnu dot org
- Cc: novikov_yuly at hotmail dot com
- Date: Thu, 17 Jul 2003 17:14:34 +0300
- Subject: Need help with dynamic_cast across shared libraries with gcc 3.2.3.
- Bcc:
Hello.
I have the following problem:
I have 2 classes - Base and Derived:
class Base
{
public:
virtual ~Base() {}
}
class Derived : public Base
{
public:
~Derived() {}
}
I need to:
1. allocate Derived object in one shared library
2. dynamic_cast the pointer to Base class
3. pass the resulting pointer to another shared library
4. dynamic_cast the received pointer back to Derived class
The last step doesn't work with gcc 3.2.3.
I cannot use the solution proposed in http://gcc.gnu.org/faq.html#dso,
since I must use -Bsymbolic option and I am not the one doing dlopen, so
I can't use RTLD_GLOBAL flag there either.
Is there any other way to make the algorithm above work with gcc 3.2.3?
Please reply to novikov_yuly@hotmail.com, since I am not subscribed to
the mailing list.
Regards,
Yuly.
_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8.
http://join.msn.com/?page=features/junkmail