high_flyer
31st August 2007, 18:28
Hi,
Due to various reasons, I have 2 class definitions in one header file, and their implementation in one implementation file.
One is a Qt3 derived class, the other is not (all though it uses a Qt objects).
The non Qt class is an implementation of an abstract class.
When linking I got the "no reference to vtabele" for the non Qt class.
The error is obvious - no vtable is generated for the non Qt class.
To make sure, I put the implementation of that class in an implementation file of its own, and then it linked ok.
All though the error is obvious, the reason for it is not (to me).
So here are my questions:
1. Is there any known issue with Qt that will not allow two vtables of two classes in one object file, or is this a general thing, not only with Qt?
2. Did any of you managed to have such a setup as mine (more then one class in the same files (and with Qt)) and managed to have the vtable generated for all classes in the same object file, if so, would be nice if you could share how.
Thanks in advance.
Due to various reasons, I have 2 class definitions in one header file, and their implementation in one implementation file.
One is a Qt3 derived class, the other is not (all though it uses a Qt objects).
The non Qt class is an implementation of an abstract class.
When linking I got the "no reference to vtabele" for the non Qt class.
The error is obvious - no vtable is generated for the non Qt class.
To make sure, I put the implementation of that class in an implementation file of its own, and then it linked ok.
All though the error is obvious, the reason for it is not (to me).
So here are my questions:
1. Is there any known issue with Qt that will not allow two vtables of two classes in one object file, or is this a general thing, not only with Qt?
2. Did any of you managed to have such a setup as mine (more then one class in the same files (and with Qt)) and managed to have the vtable generated for all classes in the same object file, if so, would be nice if you could share how.
Thanks in advance.