[wxMAC 2.8.3] Problem with compiling "appbase.cpp"

H H at h.com
Wed May 16 10:39:18 PDT 2007


In article <BzPAPD.A.LaY.phOSGB at brage.sunsite.dk>,
 vadim at wxwindows.org (Vadim Zeitlin) wrote:

> On Sun, 13 May 2007 11:16:27 +0200 H <H at h.com> wrote:
> 
> H> When compiling the Mac version (Carbon) and not having __UNIX__ defined, 
> 
>  Do you still build wxMac for OS 9? Does it still work there?
> 

No, I am not developing for OS 9. But I did not know that I should 
define __UNIX__, too.
Actually, I had a look at some headers and found constructs like that

#elif defined (__UNIX__)
...
#elif define (__WXMAC__)
#include "wx/mac/..."
...

So, these statements imply that __UNIX__ does not have to be declared 
when compiling Mac code. Otherwise the next statement is useless.
FYI: by "wx/mac/..." normally a header file is included that splits 
further into MAC OS X and MAC OS 9.

> H> Especially appbase.cpp does not compile any more because in 
> H> "wx/mac/carbon/apptrait.h" "wxToolkitInfo" is undefined. "wxToolkitInfo" 
> H> was still defined in 2.7.0 in "wx/apptrait.h" but somebody removed it. 
> H> So, where is wxTookitInfo supposed to be now?
> 
>  It doesn't exist any more (it was replaced by wxPlatformInfo). So I guess
> it should be simply removed from wx/mac/carbon/apptrait.h too, could you
> please confirm that doing it helps?
> 
>  Thanks,
> VZ

"wx/mac/carbon/apptrait.h" consists out of these lines only:

class WXDLLEXPORT wxConsoleAppTraits : public wxConsoleAppTraitsBase
{
public:
    // other miscellaneous helpers
    // ---------------------------

    virtual wxToolkitInfo& GetToolkitInfo();
};

#if wxUSE_GUI

class WXDLLEXPORT wxGUIAppTraits : public wxGUIAppTraitsBase
{
public:
    // other miscellaneous helpers
    // ---------------------------

    virtual wxToolkitInfo& GetToolkitInfo();
};

#endif // wxUSE_GUI

So, shall I remove the only non-inherited methods?

Hartwig






More information about the wx-users mailing list