bad vtable since wx2.8 on msw

Riccardo Cohen rcohen at articque.com
Thu Jan 31 06:13:59 PST 2008


It did not work, I generated a project with dialogblocks, and the 
problem was still there.

I found a solution : all my virtual members were moved to "handler" class :

class mywin:public wxWindow
{
myhandler *handler;
};

class myhandler
{
mywin*awin;
virtual void myvirtfunction();
...
};

It seems that my classes have problem to inherit from wxwindow, my 
virtual functions are all in mess. By the way PCLINTv8 complains about 
many classes in wxwigets that has non virtual destructor... Don't know 
if there is a relation... (see list below)


Anyway thanks all for your help


PCLINT errors :

C:\softdev\wxwidgets\include\wx\strvararg.h(426): error 1512: (Warning 
-- destructor for base class 'wxArgNormalizerWchar<const wchar_t *>' 
(line 426, file C:\softdev\wxwidgets\include\wx\strvararg.h) is not virtual)
C:\softdev\wxwidgets\include\wx\strvararg.h(300): error 1512: (Warning 
-- destructor for base class 'wxArgNormalizerWithBuffer<char>' (line 
300, file C:\softdev\wxwidgets\include\wx\strvararg.h) is not virtual)
C:\softdev\wxwidgets\include\wx\dynarray.h(1002): error 1512: (Warning 
-- destructor for base class 'wxArrayPtrVoid' (line 1002, file 
C:\softdev\wxwidgets\include\wx\dynarray.h) is not virtual)
C:\softdev\wxwidgets\include\wx\utils.h(26): error 1512: (Warning -- 
destructor for base class 'wxArrayString' (line 26, file 
C:\softdev\wxwidgets\include\wx\utils.h) is not virtual)
C:\softdev\wxwidgets\include\wx\dynarray.h(821): error 1512: (Warning -- 
destructor for base class 'wxBaseArrayDouble' (line 821, file 
C:\softdev\wxwidgets\include\wx\dynarray.h) is not virtual)
C:\softdev\wxwidgets\include\wx\dynarray.h(818): error 1512: (Warning -- 
destructor for base class 'wxBaseArrayInt' (line 818, file 
C:\softdev\wxwidgets\include\wx\dynarray.h) is not virtual)
C:\softdev\wxwidgets\include\wx\dynarray.h(819): error 1512: (Warning -- 
destructor for base class 'wxBaseArrayLong' (line 819, file 
C:\softdev\wxwidgets\include\wx\dynarray.h) is not virtual)
C:\softdev\wxwidgets\include\wx\dynarray.h(815): error 1512: (Warning -- 
destructor for base class 'wxBaseArrayPtrVoid' (line 815, file 
C:\softdev\wxwidgets\include\wx\dynarray.h) is not virtual)
C:\softdev\wxwidgets\include\wx\dynarray.h(817): error 1512: (Warning -- 
destructor for base class 'wxBaseArrayShort' (line 817, file 
C:\softdev\wxwidgets\include\wx\dynarray.h) is not virtual)
C:\softdev\wxwidgets\include\wx\image.h(153): error 1512: (Warning -- 
destructor for base class 
'wxImageHistogramBase_wxImplementation_HashTable' (line 153, file 
C:\softdev\wxwidgets\include\wx\image.h) is not virtual)
C:\softdev\wxwidgets\include\wx\image.h(153): error 1512: (Warning -- 
destructor for base class 'wxImageHistogramBase' (line 153, file 
C:\softdev\wxwidgets\include\wx\image.h) is not virtual)
C:\softdev\wxwidgets\include\wx\tracker.h(38): error 1512: (Warning -- 
destructor for base class 'wxTrackable' (line 38, file 
C:\softdev\wxwidgets\include\wx\tracker.h) is not virtual)
C:\softdev\wxwidgets\include\wx\gdicmn.h(654): error 1512: (Warning -- 
destructor for base class 
'wxStringToColourHashMap_wxImplementation_HashTable' (line 654, file 
C:\softdev\wxwidgets\include\wx\gdicmn.h) is not virtual)
C:\softdev\wxwidgets\include\wx\string.h(2746): error 1512: (Warning -- 
destructor for base class 'wxStringTypeBufferBase<<1>>' (line 2746, file 
C:\softdev\wxwidgets\include\wx\string.h) is not virtual)
C:\softdev\wxwidgets\include\wx\string.h(2764): error 1512: (Warning -- 
destructor for base class 'wxStringTypeBufferLengthBase<<1>>' (line 
2764, file C:\softdev\wxwidgets\include\wx\string.h) is not virtual)
C:\softdev\wxwidgets\include\wx\hash.h(44): error 1512: (Warning -- 
destructor for base class 'wxHashTableBase_Node' (line 44, file 
C:\softdev\wxwidgets\include\wx\hash.h) is not virtual)
C:\softdev\wxwidgets\include\wx\buffer.h(28): error 1512: (Warning -- 
destructor for base class 'wxCharTypeBuffer<<1>>' (line 28, file 
C:\softdev\wxwidgets\include\wx\buffer.h) is not virtual)
C:\softdev\wxwidgets\include\wx\buffer.h(28): error 1512: (Warning -- 
destructor for base class 'wxCharTypeBuffer<char>' (line 28, file 
C:\softdev\wxwidgets\include\wx\buffer.h) is not virtual)
C:\softdev\wxwidgets\include\wx\buffer.h(28): error 1512: (Warning -- 
destructor for base class 'wxCharTypeBuffer<wchar_t>' (line 28, file 
C:\softdev\wxwidgets\include\wx\buffer.h) is not virtual)
C:\softdev\wxwidgets\include\wx\gdicmn.h(612): error 1512: (Warning -- 
destructor for base class 'wxGDIObjListBase' (line 612, file 
C:\softdev\wxwidgets\include\wx\gdicmn.h) is not virtual)
C:\softdev\wxwidgets\include\wx\hashmap.h(724): error 1512: (Warning -- 
destructor for base class 
'wxLongToLongHashMap_wxImplementation_HashTable' (line 724, file 
C:\softdev\wxwidgets\include\wx\hashmap.h) is not virtual)
C:\softdev\wxwidgets\include\wx\clntdata.h(24): error 1512: (Warning -- 
destructor for base class 
'wxShadowObjectMethods_wxImplementation_HashTable' (line 24, file 
C:\softdev\wxwidgets\include\wx\clntdata.h) is not virtual)
C:\softdev\wxwidgets\include\wx\clntdata.h(29): error 1512: (Warning -- 
destructor for base class 
'wxShadowObjectFields_wxImplementation_HashTable' (line 29, file 
C:\softdev\wxwidgets\include\wx\clntdata.h) is not virtual)

Riccardo Cohen wrote:
> good idea, I'll try to use exactly wx-config flags. thanks
> 
> Vaclav Slavik wrote:
>> Riccardo Cohen wrote:
>>> It is probably a compiler bug (it works all right on mac/linux)
>>
>> Much more likely, it's messed up build system. You're using 
>> incompatible compiler flags between wx and your code (e.g. /vmg did 
>> something not entirely unlike this to me) or wrong headers or 
>> something. The chance that this has anything to do with wx code is 
>> practically nil.
>>
>> Regards,
>> Vaclav
>>
> 

-- 
Très cordialement,

Riccardo Cohen
-------------------------------------------
Articque
http://www.articque.com
149 av Général de Gaulle
37230 Fondettes - France
tel : 02-47-49-90-49
fax : 02-47-49-91-49




More information about the wx-users mailing list