Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

FileManager: Version Control Browsing

<< < (6/6)

Jenna:
It tested it on my Fedora 21 system and did a build in mock chroots for CentOS 5 to 7 and Fedora 19 to Rawhide (22) (sse: https://copr.fedoraproject.org/coprs/jenslody/codeblocks/build/71814/).
For the record: the copr-builds are all build without pch's and not out of tree.

blauzahn:
I solved the problem I had compiling the plugin starting exactly from version r10107 upwards.

If I change the include-order it works. I changed the first lines of FileExplorerUpdater.cpp from:


--- Code: ---#include <sdk.h>

#include <wx/sstream.h>
#include <wx/regex.h>
#include <set>

#include "FileExplorerUpdater.h"
#include "FileExplorer.h"
#include "se_globals.h"

--- End code ---

to:


--- Code: ---#include "FileExplorerUpdater.h"
#include "FileExplorer.h"
#include "se_globals.h"

#include <sdk.h>
#include <wx/sstream.h>
#include <wx/regex.h>
#include <set>

--- End code ---

The main point is to move sdk.h downwards. This should be fixed in trunk. Thanks!

And another point, where the dependency can be reduced: in FileManager.h there is no need to include FileExplorer.h. Instead
a forward declaration is sufficient. The include can be moved into FileManager.cpp instead.

IMHO, the include order should follow advices of:
* Herb Sutter (C++ Coding Standards §22: "Minimize definional dependencies.[...]",
* Herb Sutter (C++ Coding Standards §23: "Make header files self-sufficient" and
 * John Lakos (Large Scale C++ Software Design: Major Design Rule "The .c[pp] file of every component should include
   its own .h file as the first substantial line of code."

Therefore, I personally would prefer the #include order.

own header
plugin
cb
wx
std

The interference with pre-compiled header is another story.

stahta01:

--- Quote from: blauzahn on February 21, 2015, 08:24:58 am ---
IMHO, the include order should follow advices of:
* Herb Sutter (C++ Coding Standards §22: "Minimize definional dependencies.[...]",
* Herb Sutter (C++ Coding Standards §23: "Make header files self-sufficient" and
 * John Lakos (Large Scale C++ Software Design: Major Design Rule "The .c[pp] file of every component should include
   its own .h file as the first substantial line of code."

Therefore, I personally would prefer the #include order.

own header
plugin
cb
wx
std

The interference with pre-compiled header is another story.

--- End quote ---

I prefer this order

PCH
std
wx
cb
own header

Last time I checked this header had issues "se_globals.h" so moving it till just below sdk.h might be needed till the issues are fixed.

When I have time I will see if I can submit a patch on the headers in FileManager CB Plugin.

Tim S.





stahta01:
Quick patch that needs more testing.

https://github.com/stahta01/cb_misc/blob/master/Patches/svn/cb_PCH_FileManager.patch

Builds on Windows 7 64 Bit using 32 bit TDM GCC.
Tested both wx30 and wx28 builds.

Yes, I have finally confirmed that GCC on Linux acts like MinGW GCC and needs an include to the object folder to work.

Tested on Debian Wheezy 64 bit (wx28) it took about 30+ seconds to build without patch about 15 seconds with patch.
(The patch includes both the one linked above and the one in the code below).


--- Code: ---Index: src/plugins/contrib/FileManager/FileManager-unix.cbp
===================================================================
--- src/plugins/contrib/FileManager/FileManager-unix.cbp (revision 10123)
+++ src/plugins/contrib/FileManager/FileManager-unix.cbp (working copy)
@@ -44,6 +44,7 @@
  <Add option="-DcbDEBUG" />
  <Add option="-DCB_PRECOMP" />
  <Add option="-D__FAM__" />
+ <Add directory="../../../.objs/include" />
  <Add directory="../../../include" />
  <Add directory="../../../sdk/wxscintilla/include" />
  <Add directory="../../../include/mozilla_chardet" />

--- End code ---


Edit2: I plan to test Debian wxWidgets 3.0 branch once I get it built. My Internet connection is very slow today so it might be a while before I get the git checkout done.

Tim S.

Navigation

[0] Message Index

[*] Previous page

Go to full version