lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Failure linking sample programs: wx-2.6.2 with MinGW gcc-3.2.3


From: Evgeniy Tarassov
Subject: Re: [lmi] Failure linking sample programs: wx-2.6.2 with MinGW gcc-3.2.3 [Was: wx segfault iterating on GetChildren()]
Date: Wed, 22 Mar 2006 15:32:28 +0100

Hello, Greg!

>   undefined reference to `wxWindowList::DeleteFunction(wxWindow*)'
>   undefined reference to `wxMenuItemList::DeleteFunction(wxMenuItem*)'
> Do you get the same result? Oh...look at this...it happens with

I have the same errors while compiling samples (menu or minimal, as
you have mentioned).
After compiling wx2.6.2 and wx-HEAD with gcc3.4.2 and gcc3.2.3:
wx2.6.2+gcc3.4.2  -> compiles
wxHEAD+gcc3.4.2  -> compiles
wx2.6.2+gcc3.2.3  -> does not compile (DeleteFunction is missing)
wxHEAD+gcc3.2.3  -> does not compile (DeleteFunction is missing)

The problem is that for some reason gcc3.2.3 does not try to import
that function
(static wxMenuItemList::DeleteFunction) from the wx dll and fails to
link the sample binary.

for wx2.6.2+gcc3.2.3 (deos not compile):
$ nm menu_menu.o | grep DeleteFunction
         U __ZN10wxMenuList14DeleteFunctionEP6wxMenu
         U __ZN14wxMenuItemList14DeleteFunctionEP10wxMenuItem

for wx2.6.2+gcc3.4.2 (compiles):
$ nm samples/menu/menu_menu.o | grep DeleteFunction
         U __imp___ZN14wxMenuItemList14DeleteFunctionEP10wxMenuItem

The class itself (wxMenuItemList) itself is declared in menu.h using
WX_DECLARE_EXPORTED_LIST(wxMenuItem, wxMenuItemList);
which is a macro defined in list.h
then the only static and not-inline function is specified in menucmn.cpp using
WX_DEFINE_LIST(wxMenuItemList);

I have tried to define/remove import/export attributes for the class
declaration (the WX_DECLARE_LIST_XO macro) but didn't managed to
workaround that bug.

--
Eugene




reply via email to

[Prev in Thread] Current Thread [Next in Thread]