Author Topic: Patch to svn 4954; astyle plugin  (Read 3478 times)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Patch to svn 4954; astyle plugin
« on: March 14, 2008, 07:06:33 pm »
FYI:

When doing a windows build without using precompiled headers I get errors.

F:\SourceCode\Projects\IDEs\CodeBlocks\codeblocks\src\plugins\astyle\astyleplugin.cpp:107: error: invalid use of incomplete type 'const struct FileTreeData'
include/pluginmanager.h:28: error: forward declaration of 'const struct FileTreeData'
F:\SourceCode\Projects\IDEs\CodeBlocks\codeblocks\src\plugins\astyle\astyleplugin.cpp:109: error: incomplete type 'FileTreeData' used in nested name specifier
F:\SourceCode\Projects\IDEs\CodeBlocks\codeblocks\src\plugins\astyle\astyleplugin.cpp:114: error: incomplete type 'FileTreeData' used in nested name specifier

Many more errors follow.

Tim S

This patch stops the errors, but not sure it is right. There is two different headers with FileTreeData in C::B. I just found the correct one in cbproject.h; I am think my first patch is wrong, look at second patch.

Code
Index: src/plugins/astyle/astyleplugin.cpp
===================================================================
--- src/plugins/astyle/astyleplugin.cpp (revision 4954)
+++ src/plugins/astyle/astyleplugin.cpp (working copy)
@@ -27,6 +27,7 @@
 #include <wx/progdlg.h>
 #include "asstreamiterator.h"
 #include "cbstyledtextctrl.h"
+#include <scripting/bindings/sc_base_types.h>
 
 using std::istringstream;
 using std::string;
Index: src/CodeBlocks.cbp
===================================================================
--- src/CodeBlocks.cbp (revision 4954)
+++ src/CodeBlocks.cbp (working copy)
@@ -229,6 +229,8 @@
  <Add option="-DBUILDING_PLUGIN" />
  <Add directory="include" />
  <Add directory="plugins\astyle\astyle" />
+ <Add directory="include\scripting\include" />
+ <Add directory="include\scripting\sqplus" />
  </Compiler>
  <Linker>
  <Add option="-Wl,--enable-auto-image-base" />

I am thinking this patch below is correct.

Code
Index: src/plugins/astyle/astyleplugin.cpp
===================================================================
--- src/plugins/astyle/astyleplugin.cpp (revision 4954)
+++ src/plugins/astyle/astyleplugin.cpp (working copy)
@@ -27,6 +27,8 @@
 #include <wx/progdlg.h>
 #include "asstreamiterator.h"
 #include "cbstyledtextctrl.h"
+#include "cbproject.h"
+#include "projectmanager.h"
 
 using std::istringstream;
 using std::string;
« Last Edit: March 14, 2008, 07:34:59 pm by stahta01 »
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

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Patch to svn 4954; astyle plugin
« Reply #1 on: March 14, 2008, 09:36:35 pm »
Applied. Thanks.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Patch to svn 4954; astyle plugin
« Reply #2 on: March 14, 2008, 09:44:04 pm »
This patch stops the errors, but not sure it is right. There is two different headers with FileTreeData in C::B. I just found the correct one in cbproject.h; I am think my first patch is wrong, look at second patch.
The second patch it the right one.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ