This is the mail archive of the egcs@egcs.cygnus.com mailing list for the EGCS project. See the EGCS home page for more information.
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