Patch #913 2006-03-10 21:34

yop

Building rev 2171 without precompiled headers
Download
913-Building_rev_21.patch (773 bytes)
Category
 
Status
Closed
Close date
2006-03-14 08:01
Assigned to
 
Index: src/sdk/cbworkspace.cpp
===================================================================
--- src/sdk/cbworkspace.cpp    (revision 2171)
+++ src/sdk/cbworkspace.cpp    (working copy)
@@ -27,8 +27,8 @@
 #include "sdk_precomp.h"
 
 #ifndef CB_PRECOMP
+    #include "globals.h"
     #include "cbworkspace.h"
-    #include "globals.h"
     #include "manager.h"
     #include "configmanager.h"
     #include "messagemanager.h"
Index: src/sdk/filefilters.cpp
===================================================================
--- src/sdk/filefilters.cpp    (revision 2171)
+++ src/sdk/filefilters.cpp    (working copy)
@@ -1,5 +1,6 @@
 #include <map>
 #include <sdk_precomp.h>
+#include <globals.h>
 #include "filefilters.h"
 
 typedef std::map<wxString, wxString> FileFiltersMap;
yop 2006-03-10 21:36

A missing inclusion and some suffle in the order two headers are included.

killerbot 2006-03-12 18:42

Could you tell on what (missing types) you got errors ?

I have a little feeling that this patch might be more of a work around then an absolute fix. The fact that moving up the globals header include, seems to indicate that it might be needed by another header (and maybe also the cpp file). If this would be the case, then the header that need stuff from it should include it. Just to have an idea on which (missing) types we should focus.

killerbot 2006-03-12 18:54

I think I have fixed the include for filefilters.cpp.

One type that was not included was the wxArrayString, so I added include <wx/arrstr.h>.

And this was provided through the include of your suggestion of globals.h like this :

#if wxCHECK_VERSION(2, 5, 0)

#include <wx/arrstr.h>

#endif

No idea if that wxCHECK_VERSION is still needed ??

I think we want wx 2.6.x

killerbot 2006-03-12 18:58

and I also think I have found the other problem, or some part of it :

cbWorkSpace.h needs DEFAULT_WORKSPACE, which is declared (extern) in globals.h

So it it the header file that needs it, committed this change.

Could you try it out by updating your revisions, if it works ??

yop 2006-03-13 21:39

killerbot I'm really sorry I haven't replied, I used to get an email if any changes happened to what I've uploaded to the tracker and for this one I got no mail, it was just by coinsidence that I opened it up again. I'm updating right now to see your changes.

yop 2006-03-13 22:03

Version 1.0 revision 2189 (gcc 3.3.5 Linux/unicode, build: Mar 13 2006 22:26:38)

GetArrayFromString udeclared in sdk/filefilters.cpp, including globals.h fixes it.

Manager and GetProjectManager undeclared in plugins/debuggergdb/debuggerstate.cpp, including manager.h and projectmanager.h fixes the problem (hmm this is a new one).

That's all :)

You pinpointed the exact problems I was having in your comments. As you say they are more of workarounds but I will change a core header file only if I absolutely have to. I prefer the "safe" way. You certainly have a better overview of the project so my patch could serve as a guide to catch the errors I'm getting, hope it helped.

killerbot 2006-03-14 08:01

Yes, you are correct, I overlooked the "GetArrayFromString" in filefilters.cpp, that one comes grom globals.h .

Also added the 2 includes in debuggerstate.cpp, which are needed there.

Revision 2190.

Closing the patch, reopen if needed.