2.8.5 Compile error under Cygwin
Julian Smart
julian at anthemion.co.uk
Tue Sep 25 23:42:23 PDT 2007
Steve Holden wrote:
> I've been struggling to get wxWidgets compiled in order to be able to
> build wxPython; I would get a compile error as follows:
>
> $ ../configure --prefix=/home/wx28/ --disable-stl
> --disable-unicode --enable-optimise --enable-debug_flag
> --disable-sound --disable-precomp-headers
>
> everything proceeds along fine until make tries to compile
> helpdata.cpp, when I see
>
> /c/Steve/Projects/wxWidgets-2.8.5/bld-cygwin/bk-deps g++ -c -o
> htmldll_helpdata.o -D__WXMSW__ -I../src/tiff -I../src/jpeg
> -I../src/png -DWXUSINGDLL -DWXMAKINGDLL_HTML
> -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXDEBUG__
> -I/c/Steve/Projects/wxWidgets-2.8.5/bld-cygwin/lib/wx/include/msw-ansi-debug-2.8
> -I../include -Wall -Wundef -Wno-ctor-dtor-privacy -O2
> -fno-strict-aliasing ../src/html/helpdata.cpp
> In file included from ../include/wx/busyinfo.h:17,
> from ../src/html/helpdata.cpp:31:
> ../include/wx/generic/busyinfo.h:28: error: `wxWindow' has not been
> declared
> ../include/wx/generic/busyinfo.h:28: error: ISO C++ forbids
> declaration of `parent' with no type
> make: *** [htmldll_helpdata.o] Error 1
>
> Now I am not a C++ programmer, and so I am stabbing around somewhat
> randomly. I have found that the following patch will fix the problem
> and allow me to complete the build:
>
> $ diff -u helpdata.cpp.orig helpdata.cpp
> --- helpdata.cpp.orig 2007-09-25 21:41:12.780412800 -0400
> +++ helpdata.cpp 2007-09-25 21:42:19.876892800 -0400
> @@ -19,6 +19,7 @@
> #if wxUSE_HTML && wxUSE_STREAMS
>
> #ifndef WXPRECOMP
> + #include "wx/window.h"
> #include "wx/intl.h"
> #include "wx/log.h"
> #endif
>
> Not being a wxWidgets regular I don't really feel confident in putting
> this forward as a serious patch (since I can't understand how an
> apparently basic error like this could get by so many pairs of
> eyeballs. So I am assuming that my ignorance stops me from seeing the
> real problem.
>
> If any reader can explain the issue to me I'd appreciate knowing what
> the real fix should be.
It is a bit odd that hasn't come up before, but I've added a forward
declaration for wxWindow to busyinfo.h since there's already one for
wxFrame. Hopefully that'll fix it. Strane that other compilers without
PCH didn't trigger it.
Regards,
Julian
More information about the wx-users
mailing list