#15062 closed build error (fixed)

wxFrameBase::ShouldUpdateMenuFromIdle() not guarded by #ifdef wxUSE_MENU, as its declaration is; iPhone build fails as a result

Reported by: ulrikp Owned by:
Priority: normal Milestone: 2.9.5
Component: wxOSX-iPhone Version: stable-latest
Keywords: iPhone Core wxFrameBase::ShouldUpdateMenuFromIdle() Cc:
Blocked By: Blocking:
Patch: yes

Description

Hello,

thanks so much for your work on wxWidgets.

I tried compiling the wxosx_iphone from the Xcode project of the nightly build built on 2013-02-23. I am using XCode .

Here's the problem, which causes the wxosx_iphone Xcode project to fail to build.

In include/wx/frame.h, the static method of wxFrameBase:

bool ShouldUpdateMenuFromIdle();

is placed inside #if wxUSE_MENUS.

In src/common/framecmn.cpp, however, this method is placed outside of the

#if wxUSE_MENUS && wxUSE_STATUSBAR

...

#endif

thus causing Clang to fail, complaining that there is no declaration for wxFrameBase::ShouldUpdateMenuFromIdle() in wxFrameBase.

I attach a patch which should fix the problem.

Perhaps I am not building the iPhone port correctly, but it seems to me that even if that is the case, this method should be properly guarded by an #if.

Ulrik Sandborg-Petersen

Attachments (1)

wxframebase_patch.patch download (875 bytes) - added by ulrikp 20 months ago.
Patch to fix the build on the iPhone port

Download all attachments as: .zip

Change History (2)

Changed 20 months ago by ulrikp

Patch to fix the build on the iPhone port

comment:1 Changed 20 months ago by VZ

  • Resolution set to fixed
  • Status changed from new to closed

(In [73564]) Fix compilation in !wxUSE_MENUS case.

wxFrameBase::ShouldUpdateMenuFromIdle() should be defined inside "#if
wxUSE_MENUS" as it's only declared when wxUSE_MENUS==1.

Closes #15062.

Note: See TracTickets for help on using tickets.