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

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

<< < (21/25) > >>

ollydbg:

--- Quote from: oBFusCATed on November 07, 2015, 12:24:00 pm ---Why do you need to export the InfoPane class?

--- End quote ---
Oh, I see this is a mistake, no need to export the InfoPane class from the file /src/src/infopane.h. I don't see build errors when I remove DLLIMPORT in this file(test with my other patches). So, I will commit the fix soon. Thanks for point this out.

ollydbg:

--- Quote from: ollydbg on September 27, 2015, 09:10:55 am ---
Also, I see some warnings from C::B source:


--- Code: ----------------- Build: sdk in Code::Blocks wx3.0.x (compiler: GNU GCC Compiler)---------------

[  0.8%] g++.exe -Wall -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -Wno-deprecated-declarations -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -Woverloaded-virtual -DEXPORT_LIB -DEXPORT_EVENTS -DWXMAKINGDLL_SCI -iquote.objs30\include -I.objs30\include -I. -ID:\wx3\include -ID:\wx3\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 include\sdk_precomp.h -o .objs30\include\sdk_precomp.h.gch
In file included from include\cbauibook.h:13:0,
                 from include\sdk_common.h:133,
                 from include\sdk_precomp.h:13:
D:\wx3\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 include\sdk_common.h:133:0,
                 from include\sdk_precomp.h:13:
include\cbauibook.h:141:14: warning:   by 'bool cbAuiNotebook::AddPage(wxWindow*, const wxString&, bool, const wxBitmap&)' [-Woverloaded-virtual]
         bool AddPage(wxWindow* page,
              ^
In file included from include\cbauibook.h:13:0,
                 from include\sdk_common.h:133,
                 from include\sdk_precomp.h:13:
D:\wx3\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 include\sdk_common.h:133:0,
                 from include\sdk_precomp.h:13:
include\cbauibook.h:156:14: warning:   by 'bool cbAuiNotebook::InsertPage(size_t, wxWindow*, const wxString&, bool, const wxBitmap&)' [-Woverloaded-virtual]
         bool InsertPage(size_t page_idx,
              ^

--- End code ---

Maybe, we need to fix our C::B's source :)

--- End quote ---

Any one know how to remove such warning?
I see in our cbauibook.h, we have:

--- Code: ---class DLLIMPORT cbAuiNotebook : public wxAuiNotebook
{
    public:
...
        /** \brief Add Page
         *
         * Calls the base-class function and after that
         * MinmizeFreeSpace().
         * \param page The page to add
         * \param caption The caption of the page
         * \param select If true the page gets selected
         * \param bitmap The bitmap of the tab
         * \return true if successfull
         */
        bool AddPage(wxWindow* page,
                     const wxString& caption,
                     bool select = false,
                     const wxBitmap& bitmap = wxNullBitmap);
...

--- End code ---

And in wx's auibook.h, it has:

--- Code: ---class WXDLLIMPEXP_AUI wxAuiNotebook : public wxNavigationEnabled<wxBookCtrlBase>
{

public:

    wxAuiNotebook() { Init(); }

    wxAuiNotebook(wxWindow* parent,
                  wxWindowID id = wxID_ANY,
                  const wxPoint& pos = wxDefaultPosition,
                  const wxSize& size = wxDefaultSize,
                  long style = wxAUI_NB_DEFAULT_STYLE)
    {
        Init();
        Create(parent, id, pos, size, style);
    }

    virtual ~wxAuiNotebook();

    bool Create(wxWindow* parent,
                wxWindowID id = wxID_ANY,
                const wxPoint& pos = wxDefaultPosition,
                const wxSize& size = wxDefaultSize,
                long style = 0);

    void SetWindowStyleFlag(long style);
    void SetArtProvider(wxAuiTabArt* art);
    wxAuiTabArt* GetArtProvider() const;

    virtual void SetUniformBitmapSize(const wxSize& size);
    virtual void SetTabCtrlHeight(int height);

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

    bool InsertPage(size_t pageIdx,
                    wxWindow* page,
                    const wxString& caption,
                    bool select = false,
                    const wxBitmap& bitmap = wxNullBitmap);

    bool DeletePage(size_t page);
    bool RemovePage(size_t page);

    virtual size_t GetPageCount() const;
    virtual wxWindow* GetPage(size_t pageIdx) const;
    int GetPageIndex(wxWindow* pageWnd) const;

    bool SetPageText(size_t page, const wxString& text);
    wxString GetPageText(size_t pageIdx) const;

    bool SetPageToolTip(size_t page, const wxString& text);
    wxString GetPageToolTip(size_t pageIdx) const;

    bool SetPageBitmap(size_t page, const wxBitmap& bitmap);
    wxBitmap GetPageBitmap(size_t pageIdx) const;

    int SetSelection(size_t newPage);
    int GetSelection() const;

    virtual void Split(size_t page, int direction);

    const wxAuiManager& GetAuiManager() const { return m_mgr; }

    // Sets the normal font
    void SetNormalFont(const wxFont& font);

    // Sets the selected tab font
    void SetSelectedFont(const wxFont& font);

    // Sets the measuring font
    void SetMeasuringFont(const wxFont& font);

    // Sets the tab font
    virtual bool SetFont(const wxFont& font);

    // Gets the tab control height
    int GetTabCtrlHeight() const;

    // Gets the height of the notebook for a given page height
    int GetHeightForPageHeight(int pageHeight);

    // Shows the window menu
    bool ShowWindowMenu();

    // we do have multiple pages
    virtual bool HasMultiplePages() const { return true; }

    // we don't want focus for ourselves
    // virtual bool AcceptsFocus() const { return false; }

    //wxBookCtrlBase functions

    virtual void SetPageSize (const wxSize &size);
    virtual int  HitTest (const wxPoint &pt, long *flags=NULL) const;

    virtual int GetPageImage(size_t n) const;
    virtual bool SetPageImage(size_t n, int imageId);

    virtual int ChangeSelection(size_t n);

    virtual bool AddPage(wxWindow *page, const wxString &text, bool select,
                         int imageId);
    virtual bool DeleteAllPages();
    virtual bool InsertPage(size_t index, wxWindow *page, const wxString &text,
                            bool select, int imageId);

--- End code ---

The interesting thing is, in wx's wxAuiNotebook, it has two function declarations named AddPage:

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

and

    virtual bool AddPage(wxWindow *page, const wxString &text, bool select,
                         int imageId);


--- End code ---

Bat:
I get clean version from SVN, build with Wx 2.8.12, mingw32-g++ (tdm-1) 4.7.1, it fail with :


--- Code: ---In file included from D:\bat\data\program\gcc\codeblocks_clean\src\sdk\scrollingdialog.cpp:17:0:
include/scrollingdialog.h:162:34: error: expected initializer before ':' token
--- End code ---


--- Code: ---D:\bat\data\program\gcc\codeblocks_clean\src\src\infopane.cpp:39:1: error: definition of static data member 'InfoPane::sm_eventTable' of dllimport'd class

--- End code ---


--- Code: ---include/cbauibook.h:29:31: error: expected initializer before ':' token
--- End code ---


--- Code: ---..\..\..\include/cbstyledtextctrl.h:20:34: error: expected initializer before ':' token

--- End code ---

If I removed DLLIMPORT in theses location, it build (and works).
I haven't trace why it's give error here and not elsewhere

Is my compiler and or wx too old ?

stahta01:

--- Quote from: Bat on November 07, 2015, 05:32:33 pm ---I get clean version from SVN, build with Wx 2.8.12, mingw32-g++ (tdm-1) 4.7.1, it fail with :

--- End quote ---

Does Code::Blocks SVN r10560 fix the issue?

Tim S.

Bat:
Yes I tried with r10561 and it's ok

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version