Yield(), WXUNUSED() and compile errors with wxMSW2.8.0rc1

Volker Bartheld dr_versaeg at freenet.de
Wed Dec 13 06:23:21 PST 2006


Hi!

I just tried to migrate one of our applications from wxMSW2.7.0 (where
it built fine) to wxMSW2.8.0rc1 and got the following compile errors:

 c:\program files\wxwidgets\include\wx\app.h(230) : warning C4002: too many actual parameters for macro 'Yield'
 c:\program files\wxwidgets\include\wx\app.h(230) : error C2059: syntax error : '{'
 c:\program files\wxwidgets\include\wx\app.h(230) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
 c:\program files\wxwidgets\include\wx\app.h(406) : warning C4002: too many actual parameters for macro 'Yield'
 c:\program files\wxwidgets\include\wx\app.h(406) : error C2059: syntax error : '='
 c:\program files\wxwidgets\include\wx\app.h(406) : error C2238: unexpected token(s) preceding ';'
 c:\program files\wxwidgets\include\wx\msw\app.h(38) : warning C4002: too many actual parameters for macro 'Yield'
 c:\program files\wxwidgets\include\wx\msw\app.h(38) : error C2208: 'bool' : no members defined using this type

As it seems, WXUNUSED is defined as
    #define WXUNUSED(identifier) /* identifier */
by C:\Program Files\wxWidgets\include\wx\defs.h

but somehow the compiler doesn't like the function body definition
    virtual bool Yield(bool WXUNUSED(onlyIfNeeded) = false) { return true; }
in c:\program files\wxwidgets\include\wx\app.h anymore. Later, it
stumbles over
    virtual bool Yield(bool onlyIfNeeded = false) = 0;
.

Does that ring a bell with anyone? I'm pretty much clueless here since I
couldn't spot any relevant changes in app.h between the two versions
mentioned above...

Please help!

Thanks,

Volker
__
Mail replies to/an V B A R T H E L D at G M X dot D E






More information about the wx-users mailing list