News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Patch to svn 4954; astyle plugin

Started by stahta01, March 14, 2008, 07:06:33 PM

Previous topic - Next topic

stahta01

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.

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.


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;
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Ceniza


MortenMacFly

Quote from: stahta01 on March 14, 2008, 07:06:33 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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]