Author Topic: [RESOLVED][MacOSX 10.15] Build CB  (Read 6871 times)

Offline Suryavarman

  • Multiple posting newcomer
  • *
  • Posts: 81
    • Suryavarman
Re: [RESOLVED][MacOSX 10.15] Build CB
« Reply #15 on: January 08, 2021, 08:26:16 pm »
I have made a new test. Under macosx 10.15 I have no problem to build CB with wxWidgets 3.1.5. No need to modify codeblocks. It's works.
 
Code
commit 003d24d3c18e3d249be085d4d127380b1f1f4ce8 (HEAD -> master, origin/master, origin/HEAD)
Author: Jouk Jansen <joukj@hrem.nano.tudelft.nl>
Date:   Thu Jan 7 09:47:46 2021 +0100

    workaround for which is probably a compiler-bug on OpenVMS-AXP

Code
Name             : Code::Blocks
Version          : svn-r12286
SDK Version      : 2.6.0

Scintilla Version: 3.7.5
Author           : The Code::Blocks Team
E-mail           : info@codeblocks.org
Website          : http://www.codeblocks.org

wxWidgets Library (wxMac port)
Version 3.1.5 (Unicode: wchar_t, debug level: 0),
compiled at Jan  8 2021 18:24:34

Runtime version of toolkit used is 10.15.

I have notice something in order to do that I had to delete the wxwidgets-code folder. By dint of compiling wxWidgets, something must have made the wxWidgets project look bad. I'm going to try it again with wxwidgets tag/v3.1.4.
« Last Edit: January 08, 2021, 11:03:23 pm by Suryavarman »

Offline Suryavarman

  • Multiple posting newcomer
  • *
  • Posts: 81
    • Suryavarman
Re: [RESOLVED][MacOSX 10.15] Build CB
« Reply #16 on: January 08, 2021, 11:50:21 pm »
I have retry to build with wxWidgets tags\v3.1.4

I have the same errors

Code
libtool: compile:  clang++ -std=c++11 -DHAVE_CONFIG_H -I. -I../../../../src/include -I/…/CodeBlocks/bin/wxwidgets/lib/wx/include/osx_cocoa-unicode-3.1 -I/…/CodeBlocks/wxwidgets-code/include -D_FILE_OFFSET_BITS=64 -DwxDEBUG_LEVEL=0 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__ -I../../../../src/include -I../../../../src/sdk/wxscintilla/include -I../../../../src/plugins/contrib/wxSmith -I../../../../src/plugins/contrib/wxSmith/wxwidgets -I../../../../src/plugins/contrib/wxSmith/wxwidgets/properties -I../../../../src/plugins/contrib/wxSmith/properties -I./../wxContribItems/wxchart/include -I./../wxContribItems/wxFlatNotebook/include -I./../wxContribItems/wxImagePanel/include -I./../wxContribItems/wxthings/include -I./../wxContribItems/KWIC/include -I./../wxContribItems/wxSpeedButton -I./../wxContribItems/wxled/gizmosled/include -I./../wxContribItems/wxled/lcdWindow/include -I./../wxContribItems/wxled/led/include -I./../wxContribItems/wxled/ledpanel/include -I./../wxContribItems/wxmathplot -DCB_AUTOCONF -DPIC -I/usr/local/opt/tinyxml/include -mmacosx-version-min=10.15 -fPIC -fexceptions -MT wxthings/wxscustombutton.lo -MD -MP -MF wxthings/.deps/wxscustombutton.Tpo -c wxthings/wxscustombutton.cpp  -fno-common -DPIC -o wxthings/.libs/wxscustombutton.o
wxthings/wxscustombutton.cpp:126:86: error: cannot pass object of non-trivial type 'wxString' through variadic method; call will abort at runtime [-Wnon-pod-varargs]
            Codef(_T("%C(%W,%I,%t,%i,%P,%S,%s,%V,%N);\n"),m_Label.wx_str(),&m_Bitmap,wxART_OTHER,Style.wx_str());
                                                                                     ^
/…/CodeBlocks/wxwidgets-code/include/wx/artprov.h:49:36: note: expanded from macro 'wxART_OTHER'
#define wxART_OTHER                wxART_MAKE_CLIENT_ID(wxART_OTHER)
                                   ^
/…/CodeBlocks/wxwidgets-code/include/wx/artprov.h:31:44: note: expanded from macro 'wxART_MAKE_CLIENT_ID'
#define wxART_MAKE_CLIENT_ID(id)           wxASCII_STR(#id "_C")
                                           ^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:107:24: note: expanded from macro 'wxASCII_STR'
#define wxASCII_STR(s) wxString::FromAscii(s)
                       ^
wxthings/wxscustombutton.cpp:130:74: error: cannot pass object of non-trivial type 'wxString' through variadic method; call will abort at runtime [-Wnon-pod-varargs]
                Codef(_T("%ASetBitmapSelected(%i);\n"),&m_BitmapSelected,wxART_OTHER);
                                                                         ^
/…/CodeBlocks/wxwidgets-code/include/wx/artprov.h:49:36: note: expanded from macro 'wxART_OTHER'
#define wxART_OTHER                wxART_MAKE_CLIENT_ID(wxART_OTHER)
                                   ^
/…/CodeBlocks/wxwidgets-code/include/wx/artprov.h:31:44: note: expanded from macro 'wxART_MAKE_CLIENT_ID'
#define wxART_MAKE_CLIENT_ID(id)           wxASCII_STR(#id "_C")
                                           ^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:107:24: note: expanded from macro 'wxASCII_STR'
#define wxASCII_STR(s) wxString::FromAscii(s)
                       ^
wxthings/wxscustombutton.cpp:135:70: error: cannot pass object of non-trivial type 'wxString' through variadic method; call will abort at runtime [-Wnon-pod-varargs]
                Codef(_T("%ASetBitmapFocus(%i);\n"),&m_BitmapFocused,wxART_OTHER);
                                                                     ^
/…/CodeBlocks/wxwidgets-code/include/wx/artprov.h:49:36: note: expanded from macro 'wxART_OTHER'
#define wxART_OTHER                wxART_MAKE_CLIENT_ID(wxART_OTHER)
                                   ^
/…/CodeBlocks/wxwidgets-code/include/wx/artprov.h:31:44: note: expanded from macro 'wxART_MAKE_CLIENT_ID'
#define wxART_MAKE_CLIENT_ID(id)           wxASCII_STR(#id "_C")
                                           ^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:107:24: note: expanded from macro 'wxASCII_STR'
#define wxASCII_STR(s) wxString::FromAscii(s)
                       ^
wxthings/wxscustombutton.cpp:140:74: error: cannot pass object of non-trivial type 'wxString' through variadic method; call will abort at runtime [-Wnon-pod-varargs]
                Codef(_T("%ASetBitmapDisabled(%i);\n"),&m_BitmapDisabled,wxART_OTHER);
                                                                         ^
/…/CodeBlocks/wxwidgets-code/include/wx/artprov.h:49:36: note: expanded from macro 'wxART_OTHER'
#define wxART_OTHER                wxART_MAKE_CLIENT_ID(wxART_OTHER)
                                   ^
/…/CodeBlocks/wxwidgets-code/include/wx/artprov.h:31:44: note: expanded from macro 'wxART_MAKE_CLIENT_ID'
#define wxART_MAKE_CLIENT_ID(id)           wxASCII_STR(#id "_C")
                                           ^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:107:24: note: expanded from macro 'wxASCII_STR'
#define wxASCII_STR(s) wxString::FromAscii(s)
                       ^
4 errors generated.
make[4]: *** [wxthings/wxscustombutton.lo] Error 1

In conclusion with MacOSX 10.15:

I can build Codeblocks with wxWidgets 3.1.5 (commit 003d24d3c18e3d249be085d4d127380b1f1f4ce8 (HEAD -> master, origin/master, origin/HEAD))
I can't build Codeblocks with wxWidgets 3.1.4 (commit 6cdaedd42ba59331b3dc4ead50e0bac76ae14c19 (HEAD, tag: v3.1.4)) .
To build CB with wxWidgets 3.1.4, I have to make some modifications in codeblocks-code/src/plugins/contrib/wxSmithContribItems/wxthings/wxscustombutton.cpp
Here the modifications to build CB with wx3.1.4 (only for MacOSX 10.15 and wx v3.1.4):
Code
            Codef(_T("%C(%W,%I,%t,%i,%P,%S,%s,%V,%N);\n"),m_Label.wx_str(),&m_Bitmap,wxART_OTHER.wx_str(),Style.wx_str());

            if ( !m_BitmapSelected.IsEmpty() )
            {
                Codef(_T("%ASetBitmapSelected(%i);\n"),&m_BitmapSelected,wxART_OTHER.wx_str());
            }

            if ( !m_BitmapFocused.IsEmpty() )
            {
                Codef(_T("%ASetBitmapFocus(%i);\n"),&m_BitmapFocused,wxART_OTHER.wx_str());
            }

            if ( !m_BitmapDisabled.IsEmpty() )
            {
                Codef(_T("%ASetBitmapDisabled(%i);\n"),&m_BitmapDisabled,wxART_OTHER.wx_str());

PS: If it's confusing, tell me.
« Last Edit: January 08, 2021, 11:52:52 pm by Suryavarman »