Author Topic: 'class ToolsList::Node' has not been declared error on any recent build  (Read 17760 times)

Eden

  • Guest
ive been getting the following error trying to build any recent (as in any build from the last couple of months) build.

Code
../../src/include/toolsmanager.h:41: error: 'class ToolsList::Node' has not been declared

Its using wxGTK 2.8 built with X gif gnome joystick opengl sdl stl unicode support using GCC x86_64-pc-linux-gnu-4.2.0

Theres one mention of it in the forums http://forums.codeblocks.org/index.php/topic,5928.msg45367.html#msg45367 but no one ever helped the person so im guessing it was never resolved.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: 'class ToolsList::Node' has not been declared error on any recent build
« Reply #1 on: August 27, 2007, 09:38:02 pm »
ive been getting the following error trying to build any recent (as in any build from the last couple of months) build.

Code
../../src/include/toolsmanager.h:41: error: 'class ToolsList::Node' has not been declared

Its using wxGTK 2.8 built with X gif gnome joystick opengl sdl stl unicode support using GCC x86_64-pc-linux-gnu-4.2.0

Theres one mention of it in the forums http://forums.codeblocks.org/index.php/topic,5928.msg45367.html#msg45367 but no one ever helped the person so im guessing it was never resolved.

Try using wxWidgets built without STL, STL requires patching related to several things including Nodes in Code::Blocks.
If, I recall correctly, it is wxList class that is involved. I am at school and can't check it out.

If you are willing to test it so it works on Linux, I can create some patches to Code::Blocks SVN and try to get it to compile this weekend under Windows. You will need to know how to build Code::Blocks from source under Linux.

I don't have the time with classes to test the patches (under Linux) or to work on getting the Code::Blocks team to accept them.

Tim S
« Last Edit: August 27, 2007, 09:47:50 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

Eden

  • Guest
Re: 'class ToolsList::Node' has not been declared error on any recent build
« Reply #2 on: August 28, 2007, 02:11:01 am »
If you know how to fix it ill be more than happy to test it under Linux (im a Gentoo user so im failure with compiling everything)

In the mean time ill build wxGTK without STL and see if ti works.
« Last Edit: August 28, 2007, 02:12:58 am by Eden »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: 'class ToolsList::Node' has not been declared error on any recent build
« Reply #3 on: August 28, 2007, 12:35:19 pm »
Submitted patch "wxList related patch to help compile with STL wxWidgets"

http://developer.berlios.de/patch/?func=detailpatch&patch_id=2161&group_id=5358
https://developer.berlios.de/patch/download.php?id=2161

Note: I gave up patching the STL related errors when I got to the SDK Scripting (Squirrel SqPlus) section of code. I really have problems understanding that code.

Tim S

Misc patches that are not ready for submitting to Code::Blocks; no plan to make them ready.

Code
Index: src/sdk/cbproject.cpp
===================================================================
--- src/sdk/cbproject.cpp (revision 4413)
+++ src/sdk/cbproject.cpp (working copy)
@@ -702,9 +702,9 @@
     return RemoveFile(f);
 }
 
-int filesSort(const ProjectFile** arg1, const ProjectFile** arg2)
+int filesSort(const void* arg1, const void* arg2)
 {
-    return (*arg1)->file.GetFullPath().CompareTo((*arg2)->file.GetFullPath());
+    return ((ProjectFile*)arg1)->file.GetFullPath().CompareTo(((ProjectFile*)arg2)->file.GetFullPath());
 }
 
 void cbProject::BuildTree(wxTreeCtrl* tree, const wxTreeItemId& root, bool categorize, bool useFolders, FilesGroupsAndMasks* fgam)
Index: src/sdk/compilercommandgenerator.cpp
===================================================================
--- src/sdk/compilercommandgenerator.cpp (revision 4413)
+++ src/sdk/compilercommandgenerator.cpp (working copy)
@@ -905,7 +905,7 @@
  DBGLOG(_T("Cached"));
  }
  ret << bt << _T(' ');
- str = str.substr(0, start) + bt + str.substr(end + 1, wxString::npos);
+ str = str.substr(0, start).append(bt.append(str.substr(end + 1, wxString::npos)));
 
  // find next occurrence
  start = str.find(_T('`'));
Index: src/sdk/scripting/bindings/sc_util_dialogs.cpp
===================================================================
--- src/sdk/scripting/bindings/sc_util_dialogs.cpp (revision 4413)
+++ src/sdk/scripting/bindings/sc_util_dialogs.cpp (working copy)
@@ -69,7 +69,7 @@
         EditArrayOrderDlg* dlg = 0;
 
         if (sa.GetParamCount() == 1)
-            dlg = new EditArrayOrderDlg(0);
+            dlg = new EditArrayOrderDlg((wxWindow*)0, wxArrayString());
         else if (sa.GetParamCount() == 2)
             dlg = new EditArrayOrderDlg(0, *SqPlus::GetInstance<wxArrayString>(v, 2));
         else
Index: src/sdk/toolsmanager.cpp
===================================================================
--- src/sdk/toolsmanager.cpp (revision 4413)
+++ src/sdk/toolsmanager.cpp (working copy)
Index: src/sdk/configmanager.cpp
===================================================================
--- src/sdk/configmanager.cpp (revision 4413)
+++ src/sdk/configmanager.cpp (working copy)
@@ -286,9 +286,10 @@
         {
             size_t size = is->GetSize();
             wxString str;
-            wxChar* c = str.GetWriteBuf(size);
+            // wxChar* c = str.GetWriteBuf(size);
+            wxChar* c = (wxChar*)wxStringBuffer(str, size);
             is->Read(c, size);
-            str.UngetWriteBuf(size);
+            // str.UngetWriteBuf(size);
 
             doc = new TiXmlDocument();
 
« Last Edit: August 28, 2007, 10:12:18 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 keenblade

  • Multiple posting newcomer
  • *
  • Posts: 36
  • tao
    • keenblade
Re: 'class ToolsList::Node' has not been declared error on any recent build
« Reply #4 on: September 14, 2007, 09:59:06 pm »
...Try using wxWidgets built without STL, STL requires patching related to several things including Nodes in Code::Blocks...
Does this means  "--disable-stl" needed for wxWidgets to build codeblocks under linux?
I ask this because it seems these days I maintain the gentoo codeblocks svn ebuild. And a gentoo developer asks if this is needed.
Thanks.
Anyway it\'s all the same at the end...

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: 'class ToolsList::Node' has not been declared error on any recent build
« Reply #5 on: September 14, 2007, 10:25:35 pm »
...Try using wxWidgets built without STL, STL requires patching related to several things including Nodes in Code::Blocks...
Does this means  "--disable-stl" needed for wxWidgets to build codeblocks under linux?
I ask this because it seems these days I maintain the gentoo codeblocks svn ebuild. And a gentoo developer asks if this is needed.
Thanks.

You can add that, but I believe it defaults to being disabled during configure.

Tim S
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 keenblade

  • Multiple posting newcomer
  • *
  • Posts: 36
  • tao
    • keenblade
Re: 'class ToolsList::Node' has not been declared error on any recent build
« Reply #6 on: September 14, 2007, 11:35:35 pm »
You can add that, but I believe it defaults to being disabled during configure.
Thanks for clarifying.
Anyway it\'s all the same at the end...

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
I am bumping this thread, since I am running into this problem.
Yesterday the new version of OpenSuse was released.
It ships with wxwidgets 2.8.11, and you will never guess : apparently all these stl variants.
The moment I select wxwidgets-devel in YAST to install, a whole bunch of wxwidgets libraries get selected too (obviously), and indeed they all have names like this :
libwx_baseu-2_8_0-stl,
libwx_gtku_aui-2_8_0-stl
...

There does however is a non stl variant, you have to select the wxwidgets-wxcontainer-devel package ->
and then you get libraries like :
libwx_baseu-2_8_0-wxcontainer,
libwx_gtku_aui-2_8_0-wxcontainer
...


Important it is !!!!!!!!!!!!!!!!

Offline Freem

  • Almost regular
  • **
  • Posts: 219
I hope I will not annoy you with a resolved problem, but I also have this error, on Debian (testing with some sid and experimental)

Here the full log:
Code
$ make -j 5
Making all in src
make[1]: entrant dans le répertoire « /home/berenger/prj/codeblocks/src »
Making all in include
make[2]: entrant dans le répertoire « /home/berenger/prj/codeblocks/src/include »
rm -f ../../src/include/sdk_precomp.h.gch
g++ -DHAVE_CONFIG_H  -I/usr/local/lib/wx/include/gtk2-unicode-2.9 -I/usr/local/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I../../src/include -I../../src/sdk/wxscintilla/include -I../../src/include/tinyxml -I../../src/include/scripting/include -I../../src/include/scripting/sqplus -I../../src/include/mozilla_chardet  -Ulinux -Uunix  -O2 -ffast-math -DCB_AUTOCONF  -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -o ../../src/include/sdk_precomp.h.gch -xc++-header ./sdk_precomp.h
In file included from ./sdk_common.h:43:0,
                 from ./sdk_precomp.h:13:
./prep.h: In member function ‘ID::operator void*() const’:
./prep.h:333:45: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
In file included from ./sdk_common.h:136:0,
                 from ./sdk_precomp.h:13:
./toolsmanager.h: At global scope:
./toolsmanager.h:46:32: error: ‘ToolsList::Node’ has not been declared
make[2]: *** [../../src/include/sdk_precomp.h.gch] Erreur 1
make[2]: quittant le répertoire « /home/berenger/prj/codeblocks/src/include »
make[1]: *** [all-recursive] Erreur 1
make[1]: quittant le répertoire « /home/berenger/prj/codeblocks/src »
make: *** [all-recursive] Erreur 1

I followed the instructions in BUILD file, and http://wiki.codeblocks.org/index.php?title=Category:Installing_Code::Blocks_from_source (which are basically the same) for compilation.
To install dependencies, I simply have jens' repo in my sources.list, and used "aptitude build-dep codeblocks".

On debian, there is only one wxWidgets package for dev, and I do not know which compilation options were used. And I do not really want to play again with all the flags they use for compiling (had enough problems with a personal project, before trying to use jens' version of 1.9.4. Thanks a lot for your work jens.)
I also have to admit I did not investigate more than that, I only wanted to compile myself to confirm the closure of the crash issue on wxSmith as Danselmi asked me to do.

If there is a known solution, I suggest to update the BUILD instructions.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
It looks like you do not use wx2.8, but a self-compiled wx2.9. Recompile it without stl or try the one from my repo (wx.2.9.4-svn). Or make sure you use the correct wx-config for wx2.8.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: 'class ToolsList::Node' has not been declared error on any recent build
« Reply #10 on: April 14, 2012, 08:17:50 pm »
I followed the instructions in BUILD file, and http://wiki.codeblocks.org/index.php?title=Category:Installing_Code::Blocks_from_source (which are basically the same) for compilation.
I really doubt you did, because:
Here the full log:
Code
[...]
g++ -DHAVE_CONFIG_H  -I/usr/local/lib/wx/include/gtk2-unicode-2.9 -I/usr/local/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I../../src/include -I../../src/sdk/wxscintilla/include -I../../src/include/tinyxml -I../../src/include/scripting/include -I../../src/include/scripting/sqplus -I../../src/include/mozilla_chardet  -Ulinux -Uunix  -O2 -ffast-math -DCB_AUTOCONF  -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -o ../../src/include/sdk_precomp.h.gch -xc++-header ./sdk_precomp.h
...shows clearly that you are using wxWidgets 2.9.x which is a development release and thus, not yet fully supported by C::B (until its released). Please use the recommended version of wxWidgets (e.g. 2.8.12).
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

Offline Freem

  • Almost regular
  • **
  • Posts: 219
Re: 'class ToolsList::Node' has not been declared error on any recent build
« Reply #11 on: April 18, 2012, 11:55:11 pm »
I am sorry to have report a wrong bug, so. I should have seen that... I did not retry since that, not enough time, sorry for inconvenience.