Ubuntu 8.0.4 and Code::Blocks problem...

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
coder89
Experienced Solver
Experienced Solver
Posts: 77
Joined: Fri May 23, 2008 9:01 am

Ubuntu 8.0.4 and Code::Blocks problem...

Post by coder89 »

Hello.
I have writting my program in Code::Blocks using the latest wxGTK release. I compiled them and it works. But suddenly when I want to rebuild my program I get few errors like below:
/home/coder89/Pulpit/Programy/CoderCat/globals/../CoderCatMain.h|13|error: wx/menu.h: No such file or directory

/home/coder89/Pulpit/Programy/CoderCat/globals/../CoderCatMain.h|14|error: wx/frame.h: No such file or directory

/home/coder89/Pulpit/Programy/CoderCat/globals/../CoderCatMain.h|15|error: wx/statusbr.h: No such file or directory

/home/coder89/Pulpit/Programy/CoderCat/globals/../include/MyClasses/../../globals/Libraries.h|11|error: wx/msgdlg.h: No such file or directory

/home/coder89/Pulpit/Programy/CoderCat/globals/../include/MyClasses/../../globals/Libraries.h|13|error: wx/event.h: No such file or directory
I don't know what is wrong becouse in linker settings I have write "`wx-config --version=2.8 --static=no --unicode=yes --debug=no --libs`" and it works good. I didn't do anything with wxwidgets libraries dir.

I looks like my wxGTK suddenly disappear ;|

(It's my second time! at first time i must create my new project and copy all lines of code into them but now i have more than 20,000 lines of code and I can't do this :( )
User avatar
T-Rex
Moderator
Moderator
Posts: 1249
Joined: Sat Oct 23, 2004 9:58 am
Location: Zaporizhzhya, Ukraine
Contact:

Post by T-Rex »

try to delete configuration-specific compiler settings (from Debug and Release separately and add just call of `wx-config --cxxflags` to common compiler settings for all configurations.
the same thing for linker but with --libs switch
coder89
Experienced Solver
Experienced Solver
Posts: 77
Joined: Fri May 23, 2008 9:01 am

Post by coder89 »

Now i Get this errors :(
||=== CoderCat, Release ===|
/usr/local/include/wx-2.8/wx/hashmap.h||In member function ‘wxLongToLongHashMap_wxImplementation_HashTable::Node** wxLongToLongHashMap_wxImplementation_HashTable::GetNodePtr(const long int&) const’:|
/usr/local/include/wx-2.8/wx/hashmap.h|714|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/clntdata.h||In member function ‘wxShadowObjectMethods_wxImplementation_HashTable::Node** wxShadowObjectMethods_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:|
/usr/local/include/wx-2.8/wx/clntdata.h|20|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/clntdata.h||In member function ‘wxShadowObjectFields_wxImplementation_HashTable::Node** wxShadowObjectFields_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:|
/usr/local/include/wx-2.8/wx/clntdata.h|25|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/gdicmn.h||In member function ‘wxStringToColourHashMap_wxImplementation_HashTable::Node** wxStringToColourHashMap_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:|
/usr/local/include/wx-2.8/wx/gdicmn.h|544|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/image.h||In member function ‘wxImageHistogramBase_wxImplementation_HashTable::Node** wxImageHistogramBase_wxImplementation_HashTable::GetNodePtr(const long unsigned int&) const’:|
/usr/local/include/wx-2.8/wx/image.h|136|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/hashmap.h||In member function ‘wxLongToLongHashMap_wxImplementation_HashTable::Node** wxLongToLongHashMap_wxImplementation_HashTable::GetNodePtr(const long int&) const’:|
/usr/local/include/wx-2.8/wx/hashmap.h|714|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/clntdata.h||In member function ‘wxShadowObjectMethods_wxImplementation_HashTable::Node** wxShadowObjectMethods_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:|
/usr/local/include/wx-2.8/wx/clntdata.h|20|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/clntdata.h||In member function ‘wxShadowObjectFields_wxImplementation_HashTable::Node** wxShadowObjectFields_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:|
/usr/local/include/wx-2.8/wx/clntdata.h|25|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/gdicmn.h||In member function ‘wxStringToColourHashMap_wxImplementation_HashTable::Node** wxStringToColourHashMap_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:|
/usr/local/include/wx-2.8/wx/gdicmn.h|544|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/image.h||In member function ‘wxImageHistogramBase_wxImplementation_HashTable::Node** wxImageHistogramBase_wxImplementation_HashTable::GetNodePtr(const long unsigned int&) const’:|
/usr/local/include/wx-2.8/wx/image.h|136|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/hashmap.h||In member function ‘wxLongToLongHashMap_wxImplementation_HashTable::Node** wxLongToLongHashMap_wxImplementation_HashTable::GetNodePtr(const long int&) const’:|
/usr/local/include/wx-2.8/wx/hashmap.h|714|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/clntdata.h||In member function ‘wxShadowObjectMethods_wxImplementation_HashTable::Node** wxShadowObjectMethods_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:|
/usr/local/include/wx-2.8/wx/clntdata.h|20|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/clntdata.h||In member function ‘wxShadowObjectFields_wxImplementation_HashTable::Node** wxShadowObjectFields_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:|
/usr/local/include/wx-2.8/wx/clntdata.h|25|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/gdicmn.h||In member function ‘wxStringToColourHashMap_wxImplementation_HashTable::Node** wxStringToColourHashMap_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:|
/usr/local/include/wx-2.8/wx/gdicmn.h|544|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/hashmap.h||In member function ‘wxLongToLongHashMap_wxImplementation_HashTable::Node** wxLongToLongHashMap_wxImplementation_HashTable::GetNodePtr(const long int&) const’:|
/usr/local/include/wx-2.8/wx/hashmap.h|714|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/clntdata.h||In member function ‘wxShadowObjectMethods_wxImplementation_HashTable::Node** wxShadowObjectMethods_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:|
/usr/local/include/wx-2.8/wx/clntdata.h|20|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/clntdata.h||In member function ‘wxShadowObjectFields_wxImplementation_HashTable::Node** wxShadowObjectFields_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:|
/usr/local/include/wx-2.8/wx/clntdata.h|25|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/gdicmn.h||In member function ‘wxStringToColourHashMap_wxImplementation_HashTable::Node** wxStringToColourHashMap_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:|
/usr/local/include/wx-2.8/wx/gdicmn.h|544|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/image.h||In member function ‘wxImageHistogramBase_wxImplementation_HashTable::Node** wxImageHistogramBase_wxImplementation_HashTable::GetNodePtr(const long unsigned int&) const’:|
/usr/local/include/wx-2.8/wx/image.h|136|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/home/coder89/Pulpit/Programy/CoderCat/include/MyClasses/MySQLFunction.cpp||In member function ‘bool MySqlConnector::MySqlConnect(int, wxWindow*)’:|
/home/coder89/Pulpit/Programy/CoderCat/include/MyClasses/MySQLFunction.cpp|118|warning: suggest parentheses around assignment used as truth value|
/home/coder89/Pulpit/Programy/CoderCat/include/MyClasses/MySQLFunction.cpp||In member function ‘long int MySqlConnector::GetCount(const char*)’:|
/home/coder89/Pulpit/Programy/CoderCat/include/MyClasses/MySQLFunction.cpp|431|warning: suggest parentheses around assignment used as truth value|
/usr/local/include/wx-2.8/wx/hashmap.h||In member function ‘wxLongToLongHashMap_wxImplementation_HashTable::Node** wxLongToLongHashMap_wxImplementation_HashTable::GetNodePtr(const long int&) const’:|
/usr/local/include/wx-2.8/wx/hashmap.h|714|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/clntdata.h||In member function ‘wxShadowObjectMethods_wxImplementation_HashTable::Node** wxShadowObjectMethods_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:|
/usr/local/include/wx-2.8/wx/clntdata.h|20|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/clntdata.h||In member function ‘wxShadowObjectFields_wxImplementation_HashTable::Node** wxShadowObjectFields_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:|
/usr/local/include/wx-2.8/wx/clntdata.h|25|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/gdicmn.h||In member function ‘wxStringToColourHashMap_wxImplementation_HashTable::Node** wxStringToColourHashMap_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:|
/usr/local/include/wx-2.8/wx/gdicmn.h|544|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/hashmap.h||In member function ‘wxLongToLongHashMap_wxImplementation_HashTable::Node** wxLongToLongHashMap_wxImplementation_HashTable::GetNodePtr(const long int&) const’:|
/usr/local/include/wx-2.8/wx/hashmap.h|714|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/clntdata.h||In member function ‘wxShadowObjectMethods_wxImplementation_HashTable::Node** wxShadowObjectMethods_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:|
/usr/local/include/wx-2.8/wx/clntdata.h|20|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/clntdata.h||In member function ‘wxShadowObjectFields_wxImplementation_HashTable::Node** wxShadowObjectFields_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:|
/usr/local/include/wx-2.8/wx/clntdata.h|25|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/gdicmn.h||In member function ‘wxStringToColourHashMap_wxImplementation_HashTable::Node** wxStringToColourHashMap_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:|
/usr/local/include/wx-2.8/wx/gdicmn.h|544|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/image.h||In member function ‘wxImageHistogramBase_wxImplementation_HashTable::Node** wxImageHistogramBase_wxImplementation_HashTable::GetNodePtr(const long unsigned int&) const’:|
/usr/local/include/wx-2.8/wx/image.h|136|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/hashmap.h||In member function ‘wxLongToLongHashMap_wxImplementation_HashTable::Node** wxLongToLongHashMap_wxImplementation_HashTable::GetNodePtr(const long int&) const’:|
/usr/local/include/wx-2.8/wx/hashmap.h|714|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/clntdata.h||In member function ‘wxShadowObjectMethods_wxImplementation_HashTable::Node** wxShadowObjectMethods_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:|
/usr/local/include/wx-2.8/wx/clntdata.h|20|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/clntdata.h||In member function ‘wxShadowObjectFields_wxImplementation_HashTable::Node** wxShadowObjectFields_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:|
/usr/local/include/wx-2.8/wx/clntdata.h|25|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/gdicmn.h||In member function ‘wxStringToColourHashMap_wxImplementation_HashTable::Node** wxStringToColourHashMap_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:|
/usr/local/include/wx-2.8/wx/gdicmn.h|544|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/image.h||In member function ‘wxImageHistogramBase_wxImplementation_HashTable::Node** wxImageHistogramBase_wxImplementation_HashTable::GetNodePtr(const long unsigned int&) const’:|
/usr/local/include/wx-2.8/wx/image.h|136|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/home/coder89/Pulpit/Programy/CoderCat/include/Searcher/RunSearching.cpp||In member function ‘void RunSearching::PrepareData()’:|
/home/coder89/Pulpit/Programy/CoderCat/include/Searcher/RunSearching.cpp|77|warning: comparison between signed and unsigned integer expressions|
/home/coder89/Pulpit/Programy/CoderCat/include/Searcher/RunSearching.cpp|141|warning: comparison between signed and unsigned integer expressions|
/home/coder89/Pulpit/Programy/CoderCat/include/Searcher/RunSearching.cpp||In member function ‘void RunSearching::SendEvent(int, long int, ...)’:|
/home/coder89/Pulpit/Programy/CoderCat/include/Searcher/RunSearching.cpp|271|warning: cannot receive objects of non-POD type ‘class wxString&’ through ‘...’; call will abort at runtime|
/usr/local/include/wx-2.8/wx/hashmap.h||In member function ‘wxLongToLongHashMap_wxImplementation_HashTable::Node** wxLongToLongHashMap_wxImplementation_HashTable::GetNodePtr(const long int&) const’:|
/usr/local/include/wx-2.8/wx/hashmap.h|714|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/clntdata.h||In member function ‘wxShadowObjectMethods_wxImplementation_HashTable::Node** wxShadowObjectMethods_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:|
/usr/local/include/wx-2.8/wx/clntdata.h|20|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/clntdata.h||In member function ‘wxShadowObjectFields_wxImplementation_HashTable::Node** wxShadowObjectFields_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:|
/usr/local/include/wx-2.8/wx/clntdata.h|25|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/gdicmn.h||In member function ‘wxStringToColourHashMap_wxImplementation_HashTable::Node** wxStringToColourHashMap_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:|
/usr/local/include/wx-2.8/wx/gdicmn.h|544|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/image.h||In member function ‘wxImageHistogramBase_wxImplementation_HashTable::Node** wxImageHistogramBase_wxImplementation_HashTable::GetNodePtr(const long unsigned int&) const’:|
/usr/local/include/wx-2.8/wx/image.h|136|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/home/coder89/Pulpit/Programy/CoderCat/include/Searcher/Searcher.cpp||In constructor ‘Searcher::Searcher(wxWindow*, wxWindowID, const wxPoint&, const wxSize&, short unsigned int, wxArrayArrayString*, wxArrayString*, wxArrayString*)’:|
/home/coder89/Pulpit/Programy/CoderCat/include/Searcher/Searcher.cpp|28|warning: unused variable ‘Searching’|
/usr/local/include/wx-2.8/wx/hashmap.h||In member function ‘wxLongToLongHashMap_wxImplementation_HashTable::Node** wxLongToLongHashMap_wxImplementation_HashTable::GetNodePtr(const long int&) const’:|
/usr/local/include/wx-2.8/wx/hashmap.h|714|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/clntdata.h||In member function ‘wxShadowObjectMethods_wxImplementation_HashTable::Node** wxShadowObjectMethods_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:|
/usr/local/include/wx-2.8/wx/clntdata.h|20|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/clntdata.h||In member function ‘wxShadowObjectFields_wxImplementation_HashTable::Node** wxShadowObjectFields_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:|
/usr/local/include/wx-2.8/wx/clntdata.h|25|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/gdicmn.h||In member function ‘wxStringToColourHashMap_wxImplementation_HashTable::Node** wxStringToColourHashMap_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:|
/usr/local/include/wx-2.8/wx/gdicmn.h|544|warning: dereferencing type-punned pointer will break strict-aliasing rules|
/usr/local/include/wx-2.8/wx/image.h||In member function ‘wxImageHistogramBase_wxImplementation_HashTable::Node** wxImageHistogramBase_wxImplementation_HashTable::GetNodePtr(const long unsigned int&) const’:|
||=== Build finished: 0 errors, 48 warnings ===|
Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria »

These are not errors, only wranings :

||=== Build finished: 0 errors, 48 warnings ===|
coder89
Experienced Solver
Experienced Solver
Posts: 77
Joined: Fri May 23, 2008 9:01 am

Post by coder89 »

But how to avoid of them??
Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria »

Try using the -fno-strict-aliasing flag
FlyingIsFun1217
Super wx Problem Solver
Super wx Problem Solver
Posts: 497
Joined: Mon Nov 06, 2006 9:58 pm

Post by FlyingIsFun1217 »

Or since you're using C::B, just go into project build options, and set it to silence all warning messages.

FlyingIsFun1217
coder89
Experienced Solver
Experienced Solver
Posts: 77
Joined: Fri May 23, 2008 9:01 am

Post by coder89 »

Auria wrote:Try using the -fno-strict-aliasing flag
If I add this `--fno-strict-aliasing` the compiler can't find wxGTK headers :(
Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria »

coder89 wrote:
Auria wrote:Try using the -fno-strict-aliasing flag
If I add this `--fno-strict-aliasing` the compiler can't find wxGTK headers :(
erm, can you post the exact compiler output? i can't see how removing a warning could prevent it from finding files
DavidHart
Site Admin
Site Admin
Posts: 4254
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Post by DavidHart »

If I add this `--fno-strict-aliasing`
That should be -fno-strict-aliasing, not --. And you probably shouldn't be using backticks there.
erm, can you post the exact compiler output? i can't see how removing a warning could prevent it from finding file
Unless the `--fno...` was interpreted as a non-existent config option, and configure gave up in disgust ;) .
Post Reply