User forums > Help

who builds CB with GCC (read on please)

<< < (3/4) > >>

Der Meister:
Sorry for not answering until now but I didn't have the time yet.
I just compiled revision 2639 with gcc 3.3.6. It worked after adding one include to the debugger-plugin:

--- Code: ---Index: src/plugins/debuggergdb/debugger_defs.cpp
===================================================================
--- src/plugins/debuggergdb/debugger_defs.cpp   (revision 2639)
+++ src/plugins/debuggergdb/debugger_defs.cpp   (working copy)
@@ -7,6 +7,7 @@
 #include <wx/dialog.h>
 #include <wx/font.h>
 #include <wx/sizer.h>
+#include <wx/textctrl.h>
 
 #include <wx/arrimpl.cpp>
 WX_DEFINE_OBJARRAY(WatchesArray);

--- End code ---
Anyway, I couldn't compile the contrib-plugins yet because I get an error within byoCBTris::OnPaint (It works with gcc 3.4.6) and I did not check if Code::Blocks runs.

Besides: I'm not sure if we should still care about gcc 3.3 and older compilers. Does any distribution still use this compiler?

Pecan:

--- Quote from: Der Meister on June 29, 2006, 08:25:43 pm ---
Besides: I'm not sure if we should still care about gcc 3.3 and older compilers. Does any distribution still use this compiler?

--- End quote ---

Mac OS X 10.3 (Panther) uses it exclusively and OS X 10.4 uses it as a means to backward compatiblilty from Tiger/ppc/Intel systems.

Der Meister:
Ok, I managed to build the contrib plugins with gcc 3.3.6. The ByoGames Plugin needed a few patches to get compiled, one of them is a real error:

--- Code: ---Index: src/plugins/contrib/byogames/byocbtris.cpp
===================================================================
--- src/plugins/contrib/byogames/byocbtris.cpp  (revision 2639)
+++ src/plugins/contrib/byogames/byocbtris.cpp  (working copy)
@@ -108,7 +108,8 @@
 
 void byoCBTris::OnPaint(wxPaintEvent& event)
 {
-    wxBitmap buffer(wxImage(GetClientSize().GetWidth(),GetClientSize().GetHeight()));
+       wxSize size = GetClientSize();
+    wxBitmap buffer(wxImage(size.GetWidth(),size.GetHeight()));
     wxBufferedPaintDC DC(this,buffer);
     DrawBrickField(&DC);
     DrawCurrentChunk(&DC);
Index: src/plugins/contrib/byogames/byosnake.cpp
===================================================================
--- src/plugins/contrib/byogames/byosnake.cpp   (revision 2639)
+++ src/plugins/contrib/byogames/byosnake.cpp   (working copy)
@@ -77,7 +77,8 @@
 
 void byoSnake::OnPaint(wxPaintEvent& event)
 {
-    wxBitmap buffer(wxImage(GetClientSize().GetWidth(),GetClientSize().GetHeight()));
+       wxSize size = GetClientSize();
+    wxBitmap buffer(wxImage(size.GetWidth(),size.GetHeight()));
     wxBufferedPaintDC DC(this,buffer);
     DrawBorder(&DC);
     DrawSnake(&DC);
Index: src/plugins/contrib/byogames/byogameselect.cpp
===================================================================
--- src/plugins/contrib/byogames/byogameselect.cpp      (revision 2639)
+++ src/plugins/contrib/byogames/byogameselect.cpp      (working copy)
@@ -1,5 +1,5 @@
 #include "sdk.h"
-#ifdef CB_PRECOMP
+#ifndef CB_PRECOMP
 #include <wx/button.h>
 #include <wx/intl.h>
 #include <wx/listbox.h>

--- End code ---
The last one is a real error the two others are som surprising problems - although the original code was correct gcc 3.3.6 seems to have some problems with it. But with this workaround I got it compiled.

Anyway, make install ran without problems, too, but I can't start Code::Blocks because wxGTK is compiled with gcc 3.4 and thus not compatible to my just build version of Code::Blocks. And I don't want to recompile wxGTK twice now ;)


--- Quote from: Pecan ---Mac OS X 10.3 (Panther) uses it exclusively and OS X 10.4 uses it as a means to backward compatiblilty from Tiger/ppc/Intel systems.

--- End quote ---
Well, then we should still support this oldtimer and apply these few small patches.

killerbot:

--- Quote from: Der Meister on June 29, 2006, 08:25:43 pm ---Sorry for not answering until now but I didn't have the time yet.
I just compiled revision 2639 with gcc 3.3.6. It worked after adding one include to the debugger-plugin:

--- Code: ---Index: src/plugins/debuggergdb/debugger_defs.cpp
===================================================================
--- src/plugins/debuggergdb/debugger_defs.cpp   (revision 2639)
+++ src/plugins/debuggergdb/debugger_defs.cpp   (working copy)
@@ -7,6 +7,7 @@
 #include <wx/dialog.h>
 #include <wx/font.h>
 #include <wx/sizer.h>
+#include <wx/textctrl.h>
 
 #include <wx/arrimpl.cpp>
 WX_DEFINE_OBJARRAY(WatchesArray);

--- End code ---
Anyway, I couldn't compile the contrib-plugins yet because I get an error within byoCBTris::OnPaint (It works with gcc 3.4.6) and I did not check if Code::Blocks runs.

Besides: I'm not sure if we should still care about gcc 3.3 and older compilers. Does any distribution still use this compiler?

--- End quote ---

could you tell me what would happen if in sdk_common.h the following section would be removed :

--- Code: ---#if defined(__GNUC__) && !defined(__APPLE__)
    #if ( (__GNUC__ < 3) || ( (__GNUC__ == 3) && (__GNUC_MINOR__ < 4) ) )
        #undef CB_PRECOMP
    #endif
#endif // __GNUC__ && !__APPLE__

--- End code ---

support for old compilers : yes, that's the question.
I think Pecan was already able to build with that old gcc (and for him that section can go, because he has __APPLE__ defined ;-)  )

Der Meister:
I can compile revision 2639 with gcc 3.3.6 on Linux without these lines of code. But you should note that I still had the few patches mentioned before applied. Perhaps these are necessary and the problems that made these pachtes necessary were introduced by a recent change. That would explain why Pecan could compile Code::Blocks without errors while I couldn't. But with these patches it still works.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version