News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

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

Started by ollydbg, September 27, 2015, 04:02:20 AM

Previous topic - Next topic

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?
...
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.
This patch can fix the warning:

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()
};

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:

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

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

ollydbg

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.