Hi all,
I have a problem, (i'm newbie). I installed WxWidgets 2.8.8, and Code::Blocks 8.02 (from Vector Linux 6 repo), and made the hello example (like in the wiki), but i have compile errors, and i think i have to set something else that i didn't. I made 4 try with WxSmith (Frame Based):
1- WxWidgets Lib / advanced options /use unicode build
-------------------------------------------------------------------------------------------------------------------------------------------
Compiling: hello1Main.cpp
In file included from <command-line>:0:
./wx_pch.h:14:23: error: wx/wxprec.h: No such file or directory
In file included from /home/master/hello1/hello1Main.cpp:11:
/home/master/hello1/hello1Main.h:14:22: error: wx/sizer.h: No such file or directory
/home/master/hello1/hello1Main.h:15:25: error: wx/stattext.h: No such file or directory
/home/master/hello1/hello1Main.h:16:21: error: wx/menu.h: No such file or directory
/home/master/hello1/hello1Main.h:17:22: error: wx/panel.h: No such file or directory
/home/master/hello1/hello1Main.h:18:23: error: wx/button.h: No such file or directory
/home/master/hello1/hello1Main.h:19:22: error: wx/frame.h: No such file or directory
/home/master/hello1/hello1Main.h:20:25: error: wx/statusbr.h: No such file or directory
/home/master/hello1/hello1Main.cpp:12:23: error: wx/msgdlg.h: No such file or directory
/home/master/hello1/hello1Main.cpp:15:21: error: wx/intl.h: No such file or directory
/home/master/hello1/hello1Main.cpp:16:23: error: wx/string.h: No such file or directory
In file included from /home/master/hello1/hello1Main.cpp:11:
/home/master/hello1/hello1Main.h:24: error: expected class-name before '{' token
/home/master/hello1/hello1Main.h:27: error: expected `)' before '*' token
/home/master/hello1/hello1Main.h:33: error: 'wxCommandEvent' has not been declared
/home/master/hello1/hello1Main.h:34: error: 'wxCommandEvent' has not been declared
/home/master/hello1/hello1Main.h:35: error: 'wxCommandEvent' has not been declared
/home/master/hello1/hello1Main.h:48: error: ISO C++ forbids declaration of 'wxButton' with no type
/home/master/hello1/hello1Main.h:48: error: expected ';' before '*' token
/home/master/hello1/hello1Main.h:49: error: ISO C++ forbids declaration of 'wxPanel' with no type
/home/master/hello1/hello1Main.h:49: error: expected ';' before '*' token
/home/master/hello1/hello1Main.h:50: error: ISO C++ forbids declaration of 'wxStaticText' with no type
/home/master/hello1/hello1Main.h:50: error: expected ';' before '*' token
/home/master/hello1/hello1Main.h:51: error: ISO C++ forbids declaration of 'wxStatusBar' with no type
/home/master/hello1/hello1Main.h:51: error: expected ';' before '*' token
/home/master/hello1/hello1Main.h:54: error: ISO C++ forbids declaration of 'DECLARE_EVENT_TABLE' with no type
/home/master/hello1/hello1Main.h:55: error: expected ';' before '}' token
/home/master/hello1/hello1Main.h:55: error: expected `;' before '}' token
/home/master/hello1/hello1Main.cpp:23: error: 'wxString' does not name a type
/home/master/hello1/hello1Main.cpp:46: error: 'wxNewId' was not declared in this scope
/home/master/hello1/hello1Main.cpp:47: error: 'wxNewId' was not declared in this scope
/home/master/hello1/hello1Main.cpp:48: error: 'wxNewId' was not declared in this scope
/home/master/hello1/hello1Main.cpp:49: error: 'wxNewId' was not declared in this scope
/home/master/hello1/hello1Main.cpp:50: error: 'wxNewId' was not declared in this scope
/home/master/hello1/hello1Main.cpp:51: error: 'wxNewId' was not declared in this scope
/home/master/hello1/hello1Main.cpp:54: error: 'wxFrame' has not been declared
/home/master/hello1/hello1Main.cpp:57: error: expected constructor, destructor, or type conversion before 'END_EVENT_TABLE'
Process terminated with status 1 (0 minutes, 0 seconds)
36 errors, 0 warnings
-------------------------------------------------------------------------------------------------------------------------------------------
2- WxWidgets Lib / advanced options /use dynamic
-------------------------------------------------------------------------------------------------------------------------------------------
Compiling: hello2Main.cpp
In file included from /usr/include/wx-2.8/wx/wx.h:21,
from /usr/include/wx-2.8/wx/wxprec.h:68,
from ./wx_pch.h:14,
from <command-line>:0:
/usr/include/wx-2.8/wx/hashmap.h: In member function 'wxLongToLongHashMap_wxImplementation_HashTable::Node** wxLongToLongHashMap_wxImplementation_HashTable::GetNodePtr(const long int&) const':
/usr/include/wx-2.8/wx/hashmap.h:737: warning: dereferencing type-punned pointer will break strict-aliasing rules
In file included from /usr/include/wx-2.8/wx/event.h:18,
from /usr/include/wx-2.8/wx/wx.h:25,
from /usr/include/wx-2.8/wx/wxprec.h:68,
from ./wx_pch.h:14,
from <command-line>:0:
/usr/include/wx-2.8/wx/clntdata.h: In member function 'wxShadowObjectMethods_wxImplementation_HashTable::Node** wxShadowObjectMethods_wxImplementation_HashTable::GetNodePtr(const wxString&) const':
/usr/include/wx-2.8/wx/clntdata.h:20: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/include/wx-2.8/wx/clntdata.h: In member function 'wxShadowObjectFields_wxImplementation_HashTable::Node** wxShadowObjectFields_wxImplementation_HashTable::GetNodePtr(const wxString&) const':
/usr/include/wx-2.8/wx/clntdata.h:25: warning: dereferencing type-punned pointer will break strict-aliasing rules
In file included from /usr/include/wx-2.8/wx/event.h:21,
from /usr/include/wx-2.8/wx/wx.h:25,
from /usr/include/wx-2.8/wx/wxprec.h:68,
from ./wx_pch.h:14,
from <command-line>:0:
/usr/include/wx-2.8/wx/gdicmn.h: In member function 'wxStringToColourHashMap_wxImplementation_HashTable::Node** wxStringToColourHashMap_wxImplementation_HashTable::GetNodePtr(const wxString&) const':
/usr/include/wx-2.8/wx/gdicmn.h:544: warning: dereferencing type-punned pointer will break strict-aliasing rules
In file included from /usr/include/wx-2.8/wx/wx.h:45,
from /usr/include/wx-2.8/wx/wxprec.h:68,
from ./wx_pch.h:14,
from <command-line>:0:
/usr/include/wx-2.8/wx/image.h: In member function 'wxImageHistogramBase_wxImplementation_HashTable::Node** wxImageHistogramBase_wxImplementation_HashTable::GetNodePtr(const long unsigned int&) const':
/usr/include/wx-2.8/wx/image.h:136: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/include/unistd.h: In member function 'void hello2Frame::OnButton1Click(wxCommandEvent&)':
/usr/include/unistd.h:320: error: too few arguments to function 'int close(int)'
/home/master/hello2/hello2Main.cpp:120: error: at this point in file
Process terminated with status 1 (0 minutes, 2 seconds)
2 errors, 5 warnings
-------------------------------------------------------------------------------------------------------------------------------------------
3- WxWidgets Lib / advanced options /use dynamic + unicode
-------------------------------------------------------------------------------------------------------------------------------------------
Compiling: hello3Main.cpp
In file included from /usr/include/wx-2.8/wx/wx.h:21,
from /usr/include/wx-2.8/wx/wxprec.h:68,
from ./wx_pch.h:14,
from <command-line>:0:
/usr/include/wx-2.8/wx/hashmap.h: In member function 'wxLongToLongHashMap_wxImplementation_HashTable::Node** wxLongToLongHashMap_wxImplementation_HashTable::GetNodePtr(const long int&) const':
/usr/include/wx-2.8/wx/hashmap.h:737: warning: dereferencing type-punned pointer will break strict-aliasing rules
In file included from /usr/include/wx-2.8/wx/event.h:18,
from /usr/include/wx-2.8/wx/wx.h:25,
from /usr/include/wx-2.8/wx/wxprec.h:68,
from ./wx_pch.h:14,
from <command-line>:0:
/usr/include/wx-2.8/wx/clntdata.h: In member function 'wxShadowObjectMethods_wxImplementation_HashTable::Node** wxShadowObjectMethods_wxImplementation_HashTable::GetNodePtr(const wxString&) const':
/usr/include/wx-2.8/wx/clntdata.h:20: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/include/wx-2.8/wx/clntdata.h: In member function 'wxShadowObjectFields_wxImplementation_HashTable::Node** wxShadowObjectFields_wxImplementation_HashTable::GetNodePtr(const wxString&) const':
/usr/include/wx-2.8/wx/clntdata.h:25: warning: dereferencing type-punned pointer will break strict-aliasing rules
In file included from /usr/include/wx-2.8/wx/event.h:21,
from /usr/include/wx-2.8/wx/wx.h:25,
from /usr/include/wx-2.8/wx/wxprec.h:68,
from ./wx_pch.h:14,
from <command-line>:0:
/usr/include/wx-2.8/wx/gdicmn.h: In member function 'wxStringToColourHashMap_wxImplementation_HashTable::Node** wxStringToColourHashMap_wxImplementation_HashTable::GetNodePtr(const wxString&) const':
/usr/include/wx-2.8/wx/gdicmn.h:544: warning: dereferencing type-punned pointer will break strict-aliasing rules
In file included from /usr/include/wx-2.8/wx/wx.h:45,
from /usr/include/wx-2.8/wx/wxprec.h:68,
from ./wx_pch.h:14,
from <command-line>:0:
/usr/include/wx-2.8/wx/image.h: In member function 'wxImageHistogramBase_wxImplementation_HashTable::Node** wxImageHistogramBase_wxImplementation_HashTable::GetNodePtr(const long unsigned int&) const':
/usr/include/wx-2.8/wx/image.h:136: warning: dereferencing type-punned pointer will break strict-aliasing rules
Process terminated with status 0 (0 minutes, 3 seconds)
0 errors, 5 warnings
-------------------------------------------------------------------------------------------------------------------------------------------
4- WxWidgets Default option
-------------------------------------------------------------------------------------------------------------------------------------------
Compiling: hello4Main.cpp
In file included from /usr/include/wx-2.8/wx/wx.h:21,
from /usr/include/wx-2.8/wx/wxprec.h:68,
from ./wx_pch.h:14,
from <command-line>:0:
/usr/include/wx-2.8/wx/hashmap.h: In member function 'wxLongToLongHashMap_wxImplementation_HashTable::Node** wxLongToLongHashMap_wxImplementation_HashTable::GetNodePtr(const long int&) const':
/usr/include/wx-2.8/wx/hashmap.h:737: warning: dereferencing type-punned pointer will break strict-aliasing rules
In file included from /usr/include/wx-2.8/wx/event.h:18,
from /usr/include/wx-2.8/wx/wx.h:25,
from /usr/include/wx-2.8/wx/wxprec.h:68,
from ./wx_pch.h:14,
from <command-line>:0:
/usr/include/wx-2.8/wx/clntdata.h: In member function 'wxShadowObjectMethods_wxImplementation_HashTable::Node** wxShadowObjectMethods_wxImplementation_HashTable::GetNodePtr(const wxString&) const':
/usr/include/wx-2.8/wx/clntdata.h:20: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/include/wx-2.8/wx/clntdata.h: In member function 'wxShadowObjectFields_wxImplementation_HashTable::Node** wxShadowObjectFields_wxImplementation_HashTable::GetNodePtr(const wxString&) const':
/usr/include/wx-2.8/wx/clntdata.h:25: warning: dereferencing type-punned pointer will break strict-aliasing rules
In file included from /usr/include/wx-2.8/wx/event.h:21,
from /usr/include/wx-2.8/wx/wx.h:25,
from /usr/include/wx-2.8/wx/wxprec.h:68,
from ./wx_pch.h:14,
from <command-line>:0:
/usr/include/wx-2.8/wx/gdicmn.h: In member function 'wxStringToColourHashMap_wxImplementation_HashTable::Node** wxStringToColourHashMap_wxImplementation_HashTable::GetNodePtr(const wxString&) const':
/usr/include/wx-2.8/wx/gdicmn.h:544: warning: dereferencing type-punned pointer will break strict-aliasing rules
In file included from /usr/include/wx-2.8/wx/wx.h:45,
from /usr/include/wx-2.8/wx/wxprec.h:68,
from ./wx_pch.h:14,
from <command-line>:0:
/usr/include/wx-2.8/wx/image.h: In member function 'wxImageHistogramBase_wxImplementation_HashTable::Node** wxImageHistogramBase_wxImplementation_HashTable::GetNodePtr(const long unsigned int&) const':
/usr/include/wx-2.8/wx/image.h:136: warning: dereferencing type-punned pointer will break strict-aliasing rules
Process terminated with status 0 (0 minutes, 3 seconds)
0 errors, 5 warnings
-------------------------------------------------------------------------------------------------------------------------------------------
I'm sure i made i mistake, but don't understand which is, wrong WxWidgets install? wrong Code::Blocks install? wrong settings?
Hope someone knows it.
Thanks, Bye all