[2.8.4 latest version] Including/compiling wxchar.h
Vadim Zeitlin
vadim at wxwidgets.org
Thu Jul 5 09:26:02 PDT 2007
On Sat, 30 Jun 2007 15:54:36 +0200 H <H at h.com> wrote:
H> /Users/Hartwig/Documents/C++-Programme/PublicLibs/UILibs/wxWidgets/wxMac-
H> 2.8.4/include/wx/wxchar.h:988: error: expected initializer before
H> 'ATTRIBUTE_PRINTF_3'
H>
H> This is the critical code in wxchar.h:
H>
H> #ifndef wxSnprintf_
H> /* no snprintf(), cook our own */
H> WXDLLIMPEXP_BASE int
H> wxSnprintf_(wxChar *buf, size_t len, const wxChar *format, ...)
H> ATTRIBUTE_PRINTF_3;
H> #endif
H>
H> As I do not get any error compiling the widget library I think that
H> somehow a compile parameter is wrong.
H> Does somebody know what might have gone wrong?
Not really, ATTRIBUTE_PRINTF_3 is supposed to be defined as either
gcc-specific __attribute__ expression or nothing at all so unless you
compile with some compiler which pretends to be gcc (i.e. predefines
__GNUC__) but doesn't support __attribute__ I don't know what could it be.
Or maybe it's due to WXDLLIMPEXP_BASE being defined incorrectly but I think
you'd get many other errors in this case.
Anyhow, as usual, when you get an impossible error like this, chances are
that macros are involved in one way or the other so you should review your
compilation options and maybe examine the preprocessor output.
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
More information about the wx-users
mailing list