Author Topic: Code::blocks doesn't want to compile in release mode  (Read 4364 times)

wxKanar

  • Guest
Code::blocks doesn't want to compile in release mode
« on: November 19, 2007, 01:13:58 pm »
Hello,

I've installed wxwidgets 2.8.6 and from reprositories, and to do a test, i've created a new project with the wizard with basic options.

The new project can be compiled in debug mode, but in release i get some errors:

-------------- Build: Release in ln wxHelloWorld ---------------

Compiling: ln_wxHelloWorldApp.cpp
/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:714: warning : unreferencing of pointer type-punned will break stricts' aliases

/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: attention : déréférencement du pointeur type-punned brisera les strictes d'aliases

I get 10 errors of that type.

I'm supposing it's due to a bad configuration of the compiler settings, but i don't really know where to search!
Could anyone help me ?

Configuration : [Ubuntu 7.10] + [libs wxWidgets 2.8.6 base+Gtk runtime/debug/dev + headers] + [code::blocks 4639]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Code::blocks doesn't want to compile in release mode
« Reply #1 on: November 19, 2007, 04:43:20 pm »
Those look like warnings. Also, look like GCC 4.2.x warnings.

I suggest trying the -W first and if that does not fix it try the -f in the extra compiler options.

Tim S

-Wno-strict-aliasing
-fno-strict-aliasing

C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

wxKanar

  • Guest
Re: Code::blocks doesn't want to compile in release mode
« Reply #2 on: November 19, 2007, 10:51:49 pm »
Effectively, theses are warnings even if it appears like errors at the end of the build log !
With the standard warnings (-W) it does not appear again, and the same with -Wall -Wno-strict-aliasing.

I really believed that haven't been compiled because of the fake errors in build log.

This is not in my habits  to leave warning messages during compilations on Windows, but if it works, it will be ok for my learning on linux.

Thanks for the response, and for maintaining alive this great IDE.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Code::blocks doesn't want to compile in release mode
« Reply #3 on: November 20, 2007, 03:15:51 pm »
Which version of gcc is in Ubuntu 7.10.
I've got the same problems with 4.3, but not with 4.2. There might be a difference in the output that confuses the regexp, that decides if it's a warning or an error.
I have no time to have a look on it myself.