This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Namespace bug?
- To: egcs-common <egcs at egcs dot cygnus dot com>
- Subject: Namespace bug?
- From: Hans-Jörg Fischer <fischer at zkm dot de>
- Date: Mon, 08 Feb 1999 19:58:17 +0100
Hi!
The following problem occured during use of EGCS (latest snapshot):
Using multiple nested namespaces, the compiler looses track of the
virtual method tables. Here are some code fragments
...
namespace PortableServer {
...
class ServantBase {
....
};
class DynamicImplementation : public virtual ServantBase {
....
};
}; // namespace PortableServer
namespace ODB {
....
namespace FS {
....
class FileServant : public PortableServer::DynamicImplementation {
....
};
....
}; // namespace FS
....
}; // namespace ODB
Now, when I link the stuff above, I get
In function `ODB::FS::FileServant::FileServant(int,
ODB::FileSystemDataSource_impl *)':
undefined reference to
`ODB::FS::FileServant::PortableServer::ServantBase virtual table'
Obviously, the compiler gets confused with the base class and assumes it
in the wrong namespace.
Any suggestions?
Thanks!
Joerg