Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Build C::B against wx3.02 with gcc 5.2 under Windows

<< < (25/25)

mageia:
thanks again for ollydbg's time and patience,it works
iin my case i think the key is the first link and i modify wxwidgets 3.02's config.gcc,the second link sound like set gnu++11 on and i already done
//
# Standard flags for C++
CXXFLAGS=-std=gnu++11 -fpermissive -Wno-unused-local-typedefs -fno-keep-inline-dllexport
# Standard preprocessor flags (common for CC and CXX)
CPPFLAGS ?= -DHAVE_TR1_TYPE_TRAITS
//
and build wxwidgets and codeblocks,and it works

ollydbg:

--- Quote from: oBFusCATed on November 08, 2015, 12:29:25 pm ---
--- Quote from: ollydbg on November 07, 2015, 03:24:19 pm ---...
Any one know how to remove such warning?
...

--- End quote ---
You have to add a using directive for the function in the parent class. If our function does something special and using the original function is not a good idea you can put the using directive in the private/protected section.

--- End quote ---
This patch can fix the warning:

--- Code: ---diff --git a/src/include/cbauibook.h b/src/include/cbauibook.h
index a32ad7a..52aabd5 100644
--- a/src/include/cbauibook.h
+++ b/src/include/cbauibook.h
@@ -393,6 +393,11 @@ class DLLIMPORT cbAuiNotebook : public wxAuiNotebook
          */
         static int s_advanceDirection;
 
+    private:
+        // the following two using directives remove the "-Woverloaded-virtual" warnings
+        using wxAuiNotebook::AddPage;
+        using wxAuiNotebook::InsertPage;
+
         DECLARE_EVENT_TABLE()
 };

--- End code ---
OK to commit?
Question: do I need to add a "#if wxCHECK_VERSION(3,0,0)" check?
I just checked the wx-2.8.12's include\wx\aui\auibook.h, I don't see the virtual function named AddPage there. Instead, I see two overload functions:

--- Code: ---    bool AddPage(wxWindow* page, const wxAuiNotebookPage& info);
....
    bool AddPage(wxWindow* page,
                 const wxString& caption,
                 bool select = false,
                 const wxBitmap& bitmap = wxNullBitmap);
...

--- End code ---

oBFusCATed:
Should be safe to commit I think, it doesn't even change the ABI.

Also I think you don't have to add checks for wx3.0, because I think that I've seen this warning with wx2.8.

ollydbg:
Some news about the crash issue: sounds like an optimizer issue of GCC, see Re: SVN build crashes when trying to editing/adding new compiler flags

Navigation

[0] Message Index

[*] Previous page

Go to full version