Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while compiling wxWidgets-2.8.12 on MinGW with GCC-4.8.1

I've been trying to compile wxWidgets with MinGW's GCC (version 4.8.1), and have been receiving errors from g++, saying:

../../src/msw/treectrl.cpp: In member function 'virtual bool wxTreeCtrl::MSWOnNo
tify(int, WXLPARAM, WXLPARAM*)':
../../src/msw/treectrl.cpp:2581:17: error: 'NMTVDISPINFOWW' was not declared in
this scope
                 TV_DISPINFO *info = (TV_DISPINFO *)lParam;
                 ^
../../src/msw/treectrl.cpp:2581:30: error: 'info' was not declared in this scope

                 TV_DISPINFO *info = (TV_DISPINFO *)lParam;
                              ^
../../src/msw/treectrl.cpp:2581:51: error: expected primary-expression before ')
' token
                 TV_DISPINFO *info = (TV_DISPINFO *)lParam;
                                               ^
../../src/msw/treectrl.cpp:2581:52: error: expected ';' before 'lParam'
                 TV_DISPINFO *info = (TV_DISPINFO *)lParam;
                                                ^
In file included from ..\..\include/wx/msw/gccpriv.h:22:0,
                 from ..\..\include/wx/platform.h:577,
                 from ..\..\include/wx/defs.h:21,
                 from ..\..\include/wx/wxprec.h:13,
                 from ../../src/msw/treectrl.cpp:21:
../../src/msw/treectrl.cpp:2615:17: error: 'NMTVDISPINFOWW' was not declared in
this scope
                 TV_DISPINFO *info = (TV_DISPINFO *)lParam;
                 ^
../../src/msw/treectrl.cpp:2615:30: error: 'info' was not declared in this scope

                 TV_DISPINFO *info = (TV_DISPINFO *)lParam;
                              ^
../../src/msw/treectrl.cpp:2615:51: error: expected primary-expression before ')
' token
                 TV_DISPINFO *info = (TV_DISPINFO *)lParam;
                                               ^
../../src/msw/treectrl.cpp:2615:52: error: expected ';' before 'lParam'
                 TV_DISPINFO *info = (TV_DISPINFO *)lParam;
                                                ^
In file included from ..\..\include/wx/msw/gccpriv.h:22:0,
                 from ..\..\include/wx/platform.h:577,
                 from ..\..\include/wx/defs.h:21,
                 from ..\..\include/wx/wxprec.h:13,
                 from ../../src/msw/treectrl.cpp:21:
../../src/msw/treectrl.cpp:2659:17: error: 'NMTVDISPINFOWW' was not declared in
this scope
                 TV_DISPINFO *info = (TV_DISPINFO *)lParam;
                 ^
../../src/msw/treectrl.cpp:2659:30: error: 'info' was not declared in this scope

                 TV_DISPINFO *info = (TV_DISPINFO *)lParam;
                              ^
../../src/msw/treectrl.cpp:2659:51: error: expected primary-expression before ')
' token
                 TV_DISPINFO *info = (TV_DISPINFO *)lParam;
                                                   ^
../../src/msw/treectrl.cpp:2659:52: error: expected ';' before 'lParam'
                 TV_DISPINFO *info = (TV_DISPINFO *)lParam;
                                                    ^
In file included from ..\..\include/wx/msw/gccpriv.h:22:0,
                 from ..\..\include/wx/platform.h:577,
                 from ..\..\include/wx/defs.h:21,
                 from ..\..\include/wx/wxprec.h:13,
                 from ../../src/msw/treectrl.cpp:21:
../../src/msw/treectrl.cpp:3084:17: error: 'NMTVDISPINFOWW' was not declared in
this scope
                 TV_DISPINFO *info = (TV_DISPINFO *)lParam;
                 ^
../../src/msw/treectrl.cpp:3084:30: error: 'info' was not declared in this scope

                 TV_DISPINFO *info = (TV_DISPINFO *)lParam;
                                  ^
../../src/msw/treectrl.cpp:3084:51: error: expected primary-expression before ')
' token
                 TV_DISPINFO *info = (TV_DISPINFO *)lParam;
                                                   ^
../../src/msw/treectrl.cpp:3084:52: error: expected ';' before 'lParam'
                 TV_DISPINFO *info = (TV_DISPINFO *)lParam;
                                                    ^
makefile.gcc:9310: recipe for target 'gcc_mswudll\coredll_treectrl.o' failed
mingw32-make: *** [gcc_mswudll\coredll_treectrl.o] Error 1

Can anyone help, I've tried googling, but with minimal results (and yes I did read them!).

like image 444
Python Kid Avatar asked Dec 19 '22 22:12

Python Kid


1 Answers

You seem to have a bug in your headers, NMTVDISPINFOWW (with 2 trailing Ws) doesn't exist and shouldn't appear anywhere. You can try fixing the typo in the headers themselves or downloading a distribution of gcc for Windows known to work (such as MinGW-w64 or TDM-GCC).

like image 50
VZ. Avatar answered Dec 22 '22 12:12

VZ.