User forums > Help

Code::Blocks svn-trunk(9232) build error with wxWidgets-2.9.5 in toolsmanager.h

(1/3) > >>

zaleksf:
The error shows up as:

-------------- Build: sdk in Code::Blocks wx2.9.x (compiler: GNU GCC Compiler)---------------

i686-w64-mingw32-g++.exe -Wall C:\CodeLib\CodeBlocks -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -ftrack-macro-expansion=0 -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -Woverloaded-virtual -DEXPORT_LIB -DEXPORT_EVENTS -DWXMAKINGDLL_SCI -iquote.objs29\include -I.objs29\include -I. -IC:\CodeLib\wxWidgets-2.9.x\include -IC:\CodeLib\wxWidgets-2.9.x\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Iinclude\tinyxml -Iinclude -Iinclude\tinyxml -Iinclude\scripting\bindings -Iinclude\scripting\include -Iinclude\scripting\sqplus -Iinclude\mozilla_chardet -Iinclude\mozilla_chardet\mfbt -Iinclude\mozilla_chardet\nsprpub\pr\include -Iinclude\mozilla_chardet\xpcom -Iinclude\mozilla_chardet\xpcom\base -Iinclude\mozilla_chardet\xpcom\glue -c C:\CodeLib\CodeBlocks\src\include\sdk_precomp.h -o .objs29\include\sdk_precomp.h.gch
In file included from C:/CodeLib/CodeBlocks/src/include/cbauibook.h:10:0,
                 from C:/CodeLib/CodeBlocks/src/include/sdk_common.h:125,
                 from C:\CodeLib\CodeBlocks\src\include\sdk_precomp.h:13:
C:/CodeLib/wxWidgets-2.9.x/include/wx/aui/auibook.h:349:18: warning: 'virtual bool wxAuiNotebook::AddPage(wxWindow*, const wxString&, bool, int)' was hidden [-Woverloaded-virtual]
     virtual bool AddPage(wxWindow *page, const wxString &text, bool select,
                  ^
In file included from C:/CodeLib/CodeBlocks/src/include/sdk_common.h:125:0,
                 from C:\CodeLib\CodeBlocks\src\include\sdk_precomp.h:13:
C:/CodeLib/CodeBlocks/src/include/cbauibook.h:132:14: warning:   by 'bool cbAuiNotebook::AddPage(wxWindow*, const wxString&, bool, const wxBitmap&)' [-Woverloaded-virtual]
         bool AddPage(wxWindow* page,
              ^
In file included from C:/CodeLib/CodeBlocks/src/include/cbauibook.h:10:0,
                 from C:/CodeLib/CodeBlocks/src/include/sdk_common.h:125,
                 from C:\CodeLib\CodeBlocks\src\include\sdk_precomp.h:13:
C:/CodeLib/wxWidgets-2.9.x/include/wx/aui/auibook.h:352:18: warning: 'virtual bool wxAuiNotebook::InsertPage(size_t, wxWindow*, const wxString&, bool, int)' was hidden [-Woverloaded-virtual]
     virtual bool InsertPage(size_t index, wxWindow *page, const wxString &text,
                  ^
In file included from C:/CodeLib/CodeBlocks/src/include/sdk_common.h:125:0,
                 from C:\CodeLib\CodeBlocks\src\include\sdk_precomp.h:13:
C:/CodeLib/CodeBlocks/src/include/cbauibook.h:147:14: warning:   by 'bool cbAuiNotebook::InsertPage(size_t, wxWindow*, const wxString&, bool, const wxBitmap&)' [-Woverloaded-virtual]
         bool InsertPage(size_t page_idx,
              ^
In file included from C:/CodeLib/CodeBlocks/src/include/sdk_common.h:136:0,
                 from C:\CodeLib\CodeBlocks\src\include\sdk_precomp.h:13:
C:/CodeLib/CodeBlocks/src/include/toolsmanager.h:46:32: error: 'ToolsList::Node' has not been declared
   void DoRemoveTool(ToolsList::Node* node);


I'm using the mingw-4.8.1-win32-sjlj-rev2 (32-bit) compiler. I have successfully built wxWidgets-2.9.5+(trunk) with it with the following conditions:

WXVER_MINOR=9
WXVER_RELEASE=5
BUILD=release
MONOLITHIC=1
SHARED=1
UNICODE=1
TOOLKIT=MSW
TOOLKIT_VERSION=
WXUNIV=0
CFG=
VENDOR=custom
OFFICIAL_BUILD=0
DEBUG_FLAG=1
DEBUG_INFO=default
RUNTIME_LIBS=dynamic
MSLU=0
USE_EXCEPTIONS=1
USE_RTTI=1
USE_THREADS=1
USE_AUI=1
USE_GUI=1
USE_HTML=1
USE_MEDIA=1
USE_OPENGL=1
USE_QA=0
USE_PROPGRID=1
USE_RIBBON=1
USE_RICHTEXT=1
USE_STC=1
USE_WEBVIEW=1
USE_XRC=1
COMPILER=gcc
COMPILER_VERSION=
CC=gcc
CXX=g++
CFLAGS=
CPPFLAGS=
CXXFLAGS=
LDFLAGS=-s

I have seen other posts indicating that this may be related to wxSTL, but I did not build wx29 with STL enabled, and the setup_inc.h file indicates wxSTL = 0 (not enabled) also (by default).

I have been able to successfully build Code::Blocks with wxWidgets-2.8.12 using the same compiler, but I had hoped to use the "wx29" version. Any thoughts on how I may help troubleshoot this issue?

stahta01:

--- Quote from: zaleksf on July 28, 2013, 02:17:20 am ---I have seen other posts indicating that this may be related to wxSTL, but I did not build wx29 with STL enabled, and the setup_inc.h file indicates wxSTL = 0 (not enabled) also (by default).

--- End quote ---

What does "lib/gcc_dll/mswu/wx/setup.h" contain?

For the following options: I have stopped updating list for now.
WXWIN_COMPATIBILITY_2_8
wxUSE_STL
wxUSE_STD_CONTAINERS

Values from the wxWidgets 2.9.5 that I have just started building. Takes about 2 hours for me to build it. Re-started wxWidgets build at 10:30 PM ET because I was not building DLL version of wxWidgets.

--- Code: ---#define WXWIN_COMPATIBILITY_2_8 1
#define wxUSE_STL 0
#define wxUSE_STD_CONTAINERS 0

--- End code ---


Possibly important differences in build.cfg; note, I do NOT think these are the problem.

--- Code: ---USE_QA=1
CXXFLAGS=-fno-keep-inline-dllexport
LDFLAGS=

--- End code ---

Edit: I could NOT duplicate the problem.
I suggest making sure you built wxWidgets with the same compiler you are using to build Code::Blocks.

Edit: All testing done on Windows 7 SP1 32bit using MinGW gcc shipped with CB 12.11.

Tim S.

MortenMacFly:
Building Code::Blocks with wxWidgets v2.9.5 as written in the WiKi forks work me just fine on Windows. Neither compile errors, nor runtime errors are pointing to toolsmanager.

The only difference I see is that you are using a newer compiler: mingw-4.8.1-win32-sjlj-rev2. I am still using TDM v4.7.1.

stahta01:
If I manually set wxUSE_STD_CONTAINERS to 1; I can duplicate the issue.
(This was without rebuilding wxWidgets after doing the manual edit)

I am of the opinion that setting wxWidget's wxUSE_STD_CONTAINERS or wxUSE_STL to 1 does NOT currently work with Code::Blocks.
Note: I have NOT tested setting wxUSE_STL under 2.9; but, I believe it caused this issue with 2.8.
The wxUSE_STL was split into multiple settings in 2.9; one of which is wxUSE_STD_CONTAINERS.

Updated my old STL patch to fix a small part of this issue. http://developer.berlios.de/patch/?func=detailpatch&patch_id=2161&group_id=5358

Tim S.

stahta01:
Another patch related to this issue of using wxWidgets 2.9.5 and having wxUSE_STD_CONTAINERS = 1


--- Code: ---Index: src/sdk/scripting/bindings/sc_wxtypes.cpp
===================================================================
--- src/sdk/scripting/bindings/sc_wxtypes.cpp (revision 9239)
+++ src/sdk/scripting/bindings/sc_wxtypes.cpp (working copy)
@@ -247,16 +247,37 @@
         ///////////////////
         // wxArrayString //
         ///////////////////
+#if wxCHECK_VERSION(2, 9, 5)
+    #if wxUSE_STD_CONTAINERS
+        typedef void(wxArrayString::*WXAS_CLEAR)();
+        typedef size_t(wxArrayString::*WXAS_GETCOUNT)() const;
+        typedef wxString&(wxArrayString::*WXAS_ITEM)(size_t) const;
+    #else
+        typedef wxString&(wxArrayString::*WXAS_ITEM)(size_t);
+    #endif
+#endif
         SqPlus::SQClassDef<wxArrayString>("wxArrayString").
                 emptyCtor().
                 func(&wxArrayString::Add, "Add").
+#if wxCHECK_VERSION(2, 9, 5) && wxUSE_STD_CONTAINERS
+                func<WXAS_CLEAR>(&wxArrayString::Clear, "Clear").
+#else
                 func(&wxArrayString::Clear, "Clear").
+#endif
 //                func(&wxArrayString::Index, "Index").
                 staticFuncVarArgs(&wxArrayString_Index, "Index", "*").
+#if wxCHECK_VERSION(2, 9, 5) && wxUSE_STD_CONTAINERS
+                func<WXAS_GETCOUNT>(&wxArrayString::GetCount, "GetCount")
+#else
                 func(&wxArrayString::GetCount, "GetCount")
+#endif
+#if wxCHECK_VERSION(2, 9, 5)
+                .func<WXAS_ITEM>(&wxArrayString::Item, "Item")
+#else
                 #if !wxCHECK_VERSION(2, 9, 0) // Strange that this does not work with wx 2.9.x?!
                 .func(&wxArrayString::Item, "Item")
                 #endif
+#endif
                 ;
 
         //////////////

--- End code ---

From docs/doxygen/overviews/container.h


--- Code: --- - wxSortedArrayString and wxArrayString are separate classes now and the
   former doesn't derive from the latter. If you need to convert a sorted array
   to a normal one, you must copy all the elements. Alternatively, you may
   avoid the use of wxSortedArrayString by using a normal array and calling its
   Sort() method when needed.

--- End code ---

See simpler patch below


Tim S.

Navigation

[0] Message Index

[#] Next page

Go to full version