Good afternoon,
I'm having trouble getting a wxWidget project to compile. I'm just trying to do a basic hello world tutorial. I downloaded and installed the wxpack and followed the instructions on the wiki page:
http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef#Create_a_wxWidgets_project_in_Code::BlocksI chose to use the Mingw compilation.
When I try to compile I get these errors:
||=== test2, Debug ===|
C:\wxWidgets2.8\include\wx\defs.h|771|#error "Unsupported Windows version"|
C:\wxWidgets2.8\include\wx\defs.h|824|error: `wxUint32' does not name a type|
C:\wxWidgets2.8\include\wx\defs.h|1019|#error "error defining ssize_t, size_t is not 4 or 8 bytes"|
C:\wxWidgets2.8\include\wx\defs.h|771|#error "Unsupported Windows version"|
C:\wxWidgets2.8\include\wx\defs.h|824|error: `wxUint32' does not name a type|
C:\wxWidgets2.8\include\wx\defs.h|1019|#error "error defining ssize_t, size_t is not 4 or 8 bytes"|
C:\wxWidgets2.8\include\wx\string.h|181|error: expected init-declarator before "wxStdString"|
C:\wxWidgets2.8\include\wx\string.h|181|error: expected `,' or `;' before "wxStdString"|
C:\wxWidgets2.8\include\wx\string.h|714|error: expected `,' or `...' before '&' token|
C:\wxWidgets2.8\include\wx\string.h|715|error: ISO C++ forbids declaration of `wxStdString' with no type|
C:\wxWidgets2.8\include\wx\string.h|715|error: `wxString::wxString(int)' and `wxString::wxString(int)' cannot be overloaded|
C:\wxWidgets2.8\include\wx\string.h||In constructor `wxString::wxString(int)':|
C:\wxWidgets2.8\include\wx\string.h|715|error: `s' undeclared (first use this function)|
C:\wxWidgets2.8\include\wx\string.h|715|error: (Each undeclared identifier is reported only once for each function it appears in.)|
C:\wxWidgets2.8\include\wx\string.h|181|error: expected init-declarator before "wxStdString"|
C:\wxWidgets2.8\include\wx\string.h|181|error: expected `,' or `;' before "wxStdString"|
C:\wxWidgets2.8\include\wx\string.h|714|error: expected `,' or `...' before '&' token|
C:\wxWidgets2.8\include\wx\string.h|715|error: ISO C++ forbids declaration of `wxStdString' with no type|
C:\wxWidgets2.8\include\wx\string.h|715|error: `wxString::wxString(int)' and `wxString::wxString(int)' cannot be overloaded|
C:\wxWidgets2.8\include\wx\string.h||In constructor `wxString::wxString(int)':|
C:\wxWidgets2.8\include\wx\string.h|715|error: `s' undeclared (first use this function)|
C:\wxWidgets2.8\include\wx\string.h|715|error: (Each undeclared identifier is reported only once for each function it appears in.)|
C:\wxWidgets2.8\include\wx\gdiobj.h|44|error: `WXHANDLE' does not name a type|
C:\wxWidgets2.8\include\wx\msw\gdiimage.h|72|error: `WXHANDLE' does not name a type|
C:\wxWidgets2.8\include\wx\msw\gdiimage.h|73|error: `WXHBITMAP' does not name a type|
C:\wxWidgets2.8\include\wx\msw\gdiimage.h|74|error: `WXHICON' does not name a type|
C:\wxWidgets2.8\include\wx\msw\gdiimage.h|75|error: `WXHCURSOR' does not name a type|
C:\wxWidgets2.8\include\wx\msw\gdiimage.h||In constructor `wxGDIImageRefData::wxGDIImageRefData()':|
C:\wxWidgets2.8\include\wx\msw\gdiimage.h|40|error: `m_handle' undeclared (first use this function)|
C:\wxWidgets2.8\include\wx\msw\gdiimage.h|50|error: `m_handle' undeclared (first use this function)|
C:\wxWidgets2.8\include\wx\msw\gdiimage.h||In member function `bool wxGDIImageRefData::IsOk() const':|
C:\wxWidgets2.8\include\wx\msw\gdiimage.h|54|error: `m_handle' undeclared (first use this function)|
C:\wxWidgets2.8\include\wx\msw\gdiimage.h|152|error: `WXHANDLE' does not name a type|
C:\wxWidgets2.8\include\wx\msw\gdiimage.h|154|error: `WXHANDLE' has not been declared|
C:\wxWidgets2.8\include\wx\msw\gdiimage.h|155|error: ISO C++ forbids declaration of `handle' with no type|
C:\wxWidgets2.8\include\wx\msw\gdiimage.h|177|error: `WXHANDLE' does not name a type|
C:\wxWidgets2.8\include\wx\msw\gdiimage.h||In member function `void wxGDIImage::SetHandle(int)':|
C:\wxWidgets2.8\include\wx\msw\gdiimage.h|155|error: 'class wxGDIImageRefData' has no member named 'm_handle'|
C:\wxWidgets2.8\include\wx\msw\gdiimage.h||In member function `bool wxGDIImage::IsOk() const':|
C:\wxWidgets2.8\include\wx\msw\gdiimage.h|158|error: `GetHandle' undeclared (first use this function)|
C:\wxWidgets2.8\include\wx\msw\cursor.h|36|error: `WXHCURSOR' has not been declared|
C:\wxWidgets2.8\include\wx\msw\cursor.h|36|error: ISO C++ forbids declaration of `cursor' with no type|
C:\wxWidgets2.8\include\wx\msw\cursor.h|37|error: `WXHCURSOR' does not name a type|
C:\wxWidgets2.8\include\wx\msw\cursor.h||In member function `void wxCursor::SetHCURSOR(int)':|
C:\wxWidgets2.8\include\wx\msw\cursor.h|36|error: `WXHANDLE' undeclared (first use this function)|
C:\wxWidgets2.8\include\wx\event.h|988|error: `wxUint32' does not name a type|
C:\wxWidgets2.8\include\wx\event.h|991|error: `wxUint32' does not name a type|
C:\wxWidgets2.8\include\wx\event.h|1067|error: `wxUint32' does not name a type|
C:\wxWidgets2.8\include\wx\event.h|1068|error: `wxUint32' does not name a type|
C:\wxWidgets2.8\include\wx\event.h||In member function `wxKeyEvent& wxKeyEvent::operator=(const wxKeyEvent&)':|
C:\wxWidgets2.8\include\wx\event.h|1036|error: `m_rawCode' undeclared (first use this function)|
C:\wxWidgets2.8\include\wx\event.h|1036|error: 'const class wxKeyEvent' has no member named 'm_rawCode'|
C:\wxWidgets2.8\include\wx\event.h|1037|error: `m_rawFlags' undeclared (first use this function)|
C:\wxWidgets2.8\include\wx\event.h|1037|error: 'const class wxKeyEvent' has no member named 'm_rawFlags'|
C:\wxWidgets2.8\include\wx\msw\icon.h|71|error: `WXHICON' has not been declared|
C:\wxWidgets2.8\include\wx\msw\icon.h|71|error: ISO C++ forbids declaration of `icon' with no type|
C:\wxWidgets2.8\include\wx\msw\icon.h|72|error: `WXHICON' does not name a type|
C:\wxWidgets2.8\include\wx\msw\icon.h||In member function `void wxIcon::SetHICON(int)':|
C:\wxWidgets2.8\include\wx\msw\icon.h|71|error: `WXHANDLE' undeclared (first use this function)|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 errors, 0 warnings ===|
||=== Build finished: 50 errors, 0 warnings ===|
I'm really not sure what the issue is. I'm using Windows Vista. I've gone through several unsuccessful attempts to get wxWidget to work over the past few days, with different errors each time (this is my first time trying the wxPack, as when I downloaded it before the files were corrupted). I've tried to search for the problem unsuccessfully, so I sincerely apologize if this has been addressed and solved already elsewhere; I'm working on only a few hours sleep and thus am probably not thinking the straightest right now :shock:
Thanks!