News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Compiling the recent revisions on Linux

Started by Der Meister, February 06, 2006, 04:36:38 PM

Previous topic - Next topic

Der Meister

There is a small patch necessary to build revision 1946 and newer on Linux:

Index: src/src/app.cpp
===================================================================
--- src/src/app.cpp     (revision 1951)
+++ src/src/app.cpp     (working copy)
@@ -534,7 +534,7 @@
             #ifdef __WXMSW__
                 wxICON(A_MAIN_ICON),
             #else
-                wxIcon(app)
+                wxIcon(app),
             #endif // __WXMSW__
                 _("Building ") + wxFileNameFromPath(wxString(argv[argc-1])));
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand.
Real Programmers don't write in BASIC. Actually, no programmers write in BASIC, after the age of 12.

thomas

"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

yop

Revision 1952 (yeah I'm the one with the outdated gcc that doesn't support pch):
Code (diff) Select
Index: src/sdk/blockallocated.cpp
===================================================================
--- src/sdk/blockallocated.cpp  (revision 1952)
+++ src/sdk/blockallocated.cpp  (working copy)
@@ -13,6 +13,7 @@
#include <sdk_precomp.h>

#ifndef CB_PRECOMP
+    #include "wx/regex.h"
     #include "blockallocated.h"
#endif

Index: src/sdk/projectoptionsdlg.cpp
===================================================================
--- src/sdk/projectoptionsdlg.cpp       (revision 1952)
+++ src/sdk/projectoptionsdlg.cpp       (working copy)
@@ -32,7 +32,8 @@
     #include "projectmanager.h"
     #include "compilerfactory.h"
     #include "globals.h"
-
+    #include "scriptingmanager.h"
+
     #include <wx/xrc/xmlres.h>
     #include <wx/treectrl.h>
     #include <wx/spinctrl.h>


Also I get the following when building cclistctrl.cpp from codecompletion plugin that I wasn't able to solve :(
../../../src/sdk/blockallocated.h: In destructor `BlockAllocator<T, pool_size, debug>::~BlockAllocator() [with T = CodeBlocksEvent, unsigned int pool_size  = 75, bool debug = false]':
../../../src/sdk/blockallocated.h:140:   instantiated from here
../../../src/sdk/blockallocated.h:85: error: `_U' undeclared (first use this
   function)
Life would be so much easier if we could just look at the source code.

thomas

#3
Fixed both in 1953. :)


EDIT:
Oh by the way, you *really* want to use a more recent compiler.
I compiled wxWidgets on Ubuntu using gcc 4 the other day, and it took only 4 minutes.
Compiling wxWidgets on Windows using gcc 3.4.4 on the very same machine takes about 25 minutes...
If there is no other reason to use a more recent compiler, then I'd say this is one  8)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

yop

Quote from: thomas on February 06, 2006, 08:10:29 PM
Oh by the way, you *really* want to use a more recent compiler.
I 'll change my linux distro (decided to drop Suse) so I won't bother updating right now. But even if I do who 'll provide you with the info for compilers that don't support pch?  :lol:
Life would be so much easier if we could just look at the source code.

thomas

Quote from: yop on February 06, 2006, 10:05:41 PMBut even if I do who 'll provide you with the info for compilers that don't support pch?  :lol:
True :lol:

But hey, 4 versus 25 minutes is quite convincing, I knew it was somewhat faster, but not that much :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

sethjackson

Quote from: thomas on February 06, 2006, 10:07:25 PM
But hey, 4 versus 25 minutes is quite convincing, I knew it was somewhat faster, but not that much :)

:shock: When is GCC 4 (MinGW) coming out for us Windoze users I wonder?

thomas

If I have understood correctly, never.
Some 6 months or so ago, I read that the MinGW team would not port gcc 4.0 at all (don't remember if that info was official or inofficial). Instead, they will (according to what I read) wait for 4.1 or 4.2 to be stable and go for that then.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

sethjackson


yop

And the last one (sorry I got stuck on the last one and didn't finish make) to build flawlesly, (this file does not use #ifndef CB_PRECOMP so you'll get the double header parsing I'm afraid):
Code (diff) Select
Index: src/plugins/compilergcc/compilergcc.cpp
===================================================================
--- src/plugins/compilergcc/compilergcc.cpp     (revision 1953)
+++ src/plugins/compilergcc/compilergcc.cpp     (working copy)
@@ -36,7 +36,7 @@
#include <editormanager.h>
#include <scriptingmanager.h>
#include <configurationpanel.h>
-
+#include <pluginmanager.h>
#include <cbeditor.h>
#include <annoyingdialog.h>
#include <wx/xrc/xmlres.h>

Quote from: thomas on February 06, 2006, 10:07:25 PMBut hey, 4 versus 25 minutes is quite convincing, I knew it was somewhat faster, but not that much :)
Please don't tempt me, you know what it means to switch compilers to an rpm based installation... (especially when no official rpms are available)
Life would be so much easier if we could just look at the source code.

thomas

"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

yop

#11
For the known reasons (revision 1982)
Code (diff) Select

Index: src/sdk/compiler.cpp
===================================================================
--- src/sdk/compiler.cpp        (revision 1982)
+++ src/sdk/compiler.cpp        (working copy)
@@ -19,6 +19,7 @@
     #include "messagemanager.h"
     #include "configmanager.h"
     #include "globals.h"
+    #include "compilerfactory.h"

     #include <wx/intl.h>
     #include <wx/regex.h>
Index: src/sdk/projectoptionsdlg.cpp
===================================================================
--- src/sdk/projectoptionsdlg.cpp       (revision 1982)
+++ src/sdk/projectoptionsdlg.cpp       (working copy)
@@ -32,6 +32,7 @@
     #include "projectmanager.h"
     #include "compilerfactory.h"
     #include "globals.h"
+    #include "scriptingmanager.h"

     #include <wx/xrc/xmlres.h>
     #include <wx/treectrl.h>
Life would be so much easier if we could just look at the source code.

mandrav

Be patient!
This bug will be fixed soon...

yop

A little typo:
Code (diff) Select

Index: src/sdk/workspaceloader.cpp
===================================================================
--- src/sdk/workspaceloader.cpp (revision 2001)
+++ src/sdk/workspaceloader.cpp (working copy)
@@ -22,7 +22,7 @@
     #include "projectmanager.h"
     #include "messagemanager.h"
     #include "cbproject.h"
-    #inclued "globals.h"
+    #include "globals.h"
     #include "workspaceloader.h"
#endif



Because I need the wxSmith plugin in linux I also did a --enable-contrib build and:

Code (diff) Select

Index: src/plugins/contrib/wxSmith/wxsheaders.h
===================================================================
--- src/plugins/contrib/wxSmith/wxsheaders.h (revision 2001)
+++ src/plugins/contrib/wxSmith/wxsheaders.h (working copy)
@@ -3,7 +3,7 @@

#include <sdk.h>

-#ifdef CB_PRECOMP
+#ifndef CB_PRECOMP
     #include <wx/propgrid/propgrid.h>
     #include <wx/propgrid/propdev.h>
     #include <wx/propgrid/advprops.h>
Index: src/plugins/contrib/wxSmith/wxsevent.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxsevent.cpp (revision 2001)
+++ src/plugins/contrib/wxSmith/wxsevent.cpp (working copy)
@@ -3,6 +3,7 @@

#include "wxsmith.h"
#include "wxsglobals.h"
+#include <messagemanager.h>

const wxEventType wxEVT_SELECT_RES = wxNewEventType();
const wxEventType wxEVT_UNSELECT_RES = wxNewEventType();
Life would be so much easier if we could just look at the source code.

Michael

Quote from: sethjackson on February 06, 2006, 10:41:56 PM
Oh I see I have awhile to wait then.  :P

Sorry for the off-topic, but you can always try GCC 4.1.0 snapshot from Ceniza. I use it and it works well, despite some "modifications". Anyway, I keep my original MinGW 5 installation (but probably I will update it to 5.0.2).

Michael

PS.: In Windows GCC 4.1.0 is not so fast as in Linux :(. But may be it is because it is not the final release.
[url="http://img207.imageshack.us/img207/9728/411948picture4em.png"]http://img207.imageshack.us/img207/9728/411948picture4em.png[/url]