I don't know where is the problem. The compiler Clang 12 find some strange errors. (Not only with CB, with my projects too i have some strange compiling errors...)
I can't build wxsmith. And it's the same problem if I build CB with my own wxWidgets building or with this brew tap:
https://github.com/cdalvaro/homebrew-tap
brew install cdalvaro/tap/wxmac
My macport seem to be clean. I have the latest gcc-10 (this is for libtools if my memory is good). Homebrew is also update, my OS is update and Xcode too.
Maybe i have to uninstall something but what?
I have this errors:
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]
...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,wxA...
^
/…/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
make[3]: *** [install-recursive] Error 1
make[2]: *** [install-recursive] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
Here my script to reproduce my compilation. (Thanks to Xaviou to give his building process).
(Sorry i have just translate with DeepL.… may be is better like that :p)
# Before launching the script for the first time, you can execute the following code
# yourself in a terminal at the same level as this script. You can also let the script
# do it, but it can happen that cloning a repository does not work, in which case it
# will be up to you to do it manually.
#$ git clone https://github.com/wxWidgets/wxWidgets.git wxwidgets-code
#$ cd wxwidgets-code
#$ git submodule update --init --recursiv
#$ cd ..
#$ svn checkout http://svn.code.sf.net/p/codeblocks/code/trunk codeblocks-code
# Specify here the version of wxWidgets. It must be tagged.
# \see https://github.com/wxWidgets/wxWidgets.git
export WX_TAG="v3.1.4"
function install_dependencies()
{
if [ ! -d /Applications/Xcode.app ]; then
xcode-select --install
xcodebuild -license
fi
if [ ! -f /usr/local/bin/brew ]; then
bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
if [ ! -f /usr/bin/svn ]; then
brew install svn
fi
if [ ! -f /usr/local/bin/autoconf ]; then
brew install autoconf
fi
if [ ! -f /usr/local/bin/automake ]; then
brew install automake
fi
if [ ! -f /usr/bin/libtool ]; then
brew install libtool
fi
if [ ! -f /usr/local/include/squirrel.h ]; then
brew install squirrel
fi
if [ ! -f /usr/local/bin/hunspell ]; then
brew install hunspell
fi
if [ ! -d /usr/local/Cellar/gtk+3 ]; then
brew install gtk+3
fi
if [ ! -d /usr/local/Cellar/coreutils ]; then
brew install coreutils
fi
if [ ! -d /usr/local/Cellar/tinyxml ]; then
brew install tinyxml
fi
#echo "macports update."
# ça peut être long
#sudo port selfupdate
#echo "libgcc installation."
#sudo port install libgcc
#echo "cctools installation."
#sudo port install cctools
}
# To be launched before to be sure to have coreutils to be able to execute the greadlink command.
install_dependencies
# Absolute path to this script, e.g. /home/user/bin/foo.sh
# https://stackoverflow.com/questions/1055671/how-can-i-get-the-behavior-of-gnus-readlink-f-on-a-mac
SCRIPT=$(greadlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
cd "$SCRIPTPATH"
export CXX=clang++
export CC=clang
export OUT_WX="$SCRIPTPATH/bin/wxwidgets"
export OUT_CB="$SCRIPTPATH/bin/codeblocks"
function wxwidgets_build()
{
cd wxwidgets-code
git reset --hard
git clean -f -d
git pull
git checkout "tags/$WX_TAG"
git submodule update --recursive
# https://wiki.wxwidgets.org/Possible_Configure_Flags_under_OS_X
cd "$SCRIPTPATH"
if [ ! -d ./bin ]; then
mkdir bin
fi
cd bin
if [ -d "$OUT_WX" ]; then
rm -r -v -f "$OUT_WX"
fi
mkdir wxwidgets
cd wxwidgets
"$SCRIPTPATH/wxwidgets-code/configure" --with-osx-cocoa --with-macosx-version-min=10.15 --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk --disable-debug --disable-debug-flag
nice make -j $(($(nproc) -1))
}
function codeblocks_build()
{
cd "$SCRIPTPATH"
if [ ! -d ./bin ]; then
mkdir bin
fi
cd bin
if [ -d "$OUT_CB" ]; then
rm -r -v -f "$OUT_CB"
fi
mkdir codeblocks
cd "$SCRIPTPATH"
cd codeblocks-code
svn revert --recursive .
svn update
# To make sure you start again from scratch. You can do that : ´cd codeblock-code | svn cleanup --remove-unversioned
# before to launch the script.
if [ -f ./configure ]; then
make clean
make distclean
make clean-bin
make clean-zipfiles
else
./bootstrap
fi
export CXXFLAGS=-mmacosx-version-min=10.15
./configure --disable-pch --with-wx-config="$OUT_WX/wx-config" --prefix=$OUT_CB --with-contrib-plugins=all,-FileManager,-NassiShneiderman
make -j $(($(nproc) -1))
make install
./bundle.sh
read -r -p 'Would you like to replace /Applications/CodeBlocks.app with this new ./CodeBlocks.app? ( type "y" for yes or "n" for no ): '
if [ "${REPLY}" == 'y' ]; then
cp -R ./CodeBlocks.app /Applications
fi
}
if [ ! -d ./wxwidgets-code ]; then
git clone https://github.com/wxWidgets/wxWidgets.git wxwidgets-code
cd wxwidgets-code
git submodule update --init --recursive
wxwidgets_build
else
read -r -p 'Would you like to re-compile wxWidgets? ( type "y" for yes or "n" for no ): '
if [ "${REPLY}" == 'y' ]; then
wxwidgets_build
fi
fi
if [ ! -d ./codeblocks_code ]; then
svn checkout http://svn.code.sf.net/p/codeblocks/code/trunk codeblocks-code
fi
codeblocks_build
i use the last wxWidgets tag version tag/v3.1.4
https://github.com/wxWidgets/wxWidgets/commits/v3.1.4
I have change the wxwidgets configure arguments by these:
"$SCRIPTPATH/wxwidgets-code/configure" --with-osx-cocoa --with-macosx-version-min=10.15 --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk --disable-debug --disable-debug-flag --enable-unicode --enable-cxx11 --enable-stl --with-opengl --with-expat=builtin --with-libjpeg=builtin --with-libpng=builtin --with-regex=builtin --with-libtiff=builtin --with-zlib=builtin
And now i have only one error
Making install in wxSmith
Making install in properties
make[6]: Nothing to be done for `install-exec-am'.
/usr/local/bin/gmkdir -p '/…/CodeBlocks/bin/codeblocks/include/wxsmith/properties'
/usr/local/bin/ginstall -c -m 644 ./wxspropertycontainer.h ./wxsproperties.h ./wxsboolproperty.h ./wxspropertystream.h ./wxsflagsproperty.h ./wxsfloatproperty.h ./wxsemptyproperty.h ./wxslongproperty.h ./wxsarraystringeditordlg.h ./wxsenumproperty.h ./wxsarraystringproperty.h ./wxsstringproperty.h ./wxsquickpropspanel.h ./wxsproperty.h ./wxspropertygridmanager.h ./wxscustomeditorproperty.h ./wxstwolongproperty.h ./wxseditenumproperty.h '/…/CodeBlocks/bin/codeblocks/include/wxsmith/properties'
Making install in wxwidgets
Making install in defitems
depbase=`echo wxstreectrl.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ../../../../../../libtool --tag=CXX --mode=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 -DCB_AUTOCONF -DPIC -I/usr/local/opt/tinyxml/include -mmacosx-version-min=10.15 -fPIC -fexceptions -MT wxstreectrl.lo -MD -MP -MF $depbase.Tpo -c -o wxstreectrl.lo wxstreectrl.cpp &&\
mv -f $depbase.Tpo $depbase.Plo
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 -DCB_AUTOCONF -DPIC -I/usr/local/opt/tinyxml/include -mmacosx-version-min=10.15 -fPIC -fexceptions -MT wxstreectrl.lo -MD -MP -MF .deps/wxstreectrl.Tpo -c wxstreectrl.cpp -fno-common -DPIC -o .libs/wxstreectrl.o
wxstreectrl.cpp:346:26: error: cannot cast from type 'wxString' to pointer type 'const wxChar *' (aka 'const wchar_t *')
pImageNames[i] = (const wxChar *) sImageNames[i];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[6]: *** [wxstreectrl.lo] Error 1
make[5]: *** [install-recursive] Error 1
make[4]: *** [install-recursive] Error 1
make[3]: *** [install-recursive] Error 1
make[2]: *** [install-recursive] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
Here the offending code:
codeblocks-code/src/plugins/contrib/wxSmith/wxwidgets/defitems/wxstreectrl.cpp
…
void wxsTreeCtrl::OnEnumWidgetProperties(cb_unused long Flags)
{
static wxString sImageNames[128];
static const wxChar *pImageNames[128];
int i, n;
wxString ss, tt;
wxArrayString aa;
// find available image lists and store them in our local static arrays
FindAllImageLists(aa);
n = aa.GetCount();
if(n > 127)
{
n = 127;
}
for(i = 0; i < n; i++)
{
ss = aa.Item(i);
sImageNames[i] = ss;
pImageNames[i] = (const wxChar *) sImageNames[i]; // <------------ HERE
}
…
Here some help to converting wxString
https://wiki.wxwidgets.org/Converting_everything_to_and_from_wxString
[EDIT] I have just see your answer. I fix that and we will see if it's the problem.
-----
If i try an explicit convertion i have this error:
wxstreectrl.cpp:346:26: error: cannot cast from type 'const wxScopedCharBuffer' (aka 'const wxScopedCharTypeBuffer<char>') to pointer type 'const wxChar *' (aka 'const wchar_t *')
pImageNames[i] = (const wxChar *) sImageNames[i].mb_str();
https://docs.wxwidgets.org/trunk/classwx_scoped_char_type_buffer.html
If i add the operator () to convert the buffer in c string, i have this error
wxstreectrl.cpp:346:43: error: type 'const wxScopedCharBuffer' (aka 'const wxScopedCharTypeBuffer<char>') does not provide a call operator
pImageNames[i] = (const wxChar *) sImageNames[i].mb_str()();
And finaly with the data() function the error has been fix.
pImageNames[i] = (const wxChar *) sImageNames[i].data();
Now i can see the orthers:
wxspagesetupdialog.cpp:242:9: error: no viable conversion from 'const wxString' to 'const wxChar *' (aka 'const wchar_t *')
_("Use specific dimensions"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/translation.h:39:48: note: expanded from macro '_'
#define _(s) wxGetTranslation((s))
^~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1318:3: note: candidate function
operator wxStringToStdStringRetType() const { return ToStdString(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1320:3: note: candidate function
operator wxStringToStdWstringRetType() const { return ToStdWstring(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1566:5: note: candidate function
operator wxCStrData() const { return c_str(); }
^
wxspagesetupdialog.cpp:243:9: error: no viable conversion from 'const wxString' to 'const wxChar *' (aka 'const wchar_t *')
_("Letter, 8 1/2 by 11 inches"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/translation.h:39:48: note: expanded from macro '_'
#define _(s) wxGetTranslation((s))
^~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1318:3: note: candidate function… operator wxStringToStdStringRetType() const { return ToStdString(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1320:3: note: candidate function
operator wxStringToStdWstringRetType() const { return ToStdWstring(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1566:5: note: candidate function
operator wxCStrData() const { return c_str(); }
^
wxspagesetupdialog.cpp:244:9: error: no viable conversion from 'const wxString' to 'const wxChar *' (aka 'const wchar_t *')
_("Legal, 8 1/2 by 14 inches"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/translation.h:39:48: note: expanded from macro '_'
#define _(s) wxGetTranslation((s))
^~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1318:3: note: candidate function
operator wxStringToStdStringRetType() const { return ToStdString(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1320:3: note: candidate function
operator wxStringToStdWstringRetType() const { return ToStdWstring(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1566:5: note: candidate function
operator wxCStrData() const { return c_str(); }
^
wxspagesetupdialog.cpp:245:9: error: no viable conversion from 'const wxString' to 'const wxChar *' (aka 'const wchar_t *')
_("A4 Sheet, 210 by 297 millimeters"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/translation.h:39:48: note: expanded from macro '_'
#define _(s) wxGetTranslation((s))
^~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1318:3: note: candidate function
operator wxStringToStdStringRetType() const { return ToStdString(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1320:3: note: candidate function
operator wxStringToStdWstringRetType() const { return ToStdWstring(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1566:5: note: candidate function
operator wxCStrData() const { return c_str(); }
^
wxspagesetupdialog.cpp:246:9: error: no viable conversion from 'const wxString' to 'const wxChar *' (aka 'const wchar_t *')
_("C Sheet, 17 by 22 inches"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/translation.h:39:48: note: expanded from macro '_'
#define _(s) wxGetTranslation((s))
^~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1318:3: note: candidate function
operator wxStringToStdStringRetType() const { return ToStdString(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1320:3: note: candidate function
operator wxStringToStdWstringRetType() const { return ToStdWstring(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1566:5: note: candidate function
operator wxCStrData() const { return c_str(); }
^
wxspagesetupdialog.cpp:247:9: error: no viable conversion from 'const wxString' to 'const wxChar *' (aka 'const wchar_t *')
_("D Sheet, 22 by 34 inches"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/translation.h:39:48: note: expanded from macro '_'
#define _(s) wxGetTranslation((s))
^~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1318:3: note: candidate function
operator wxStringToStdStringRetType() const { return ToStdString(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1320:3: note: candidate function
operator wxStringToStdWstringRetType() const { return ToStdWstring(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1566:5: note: candidate function
operator wxCStrData() const { return c_str(); }
^
wxspagesetupdialog.cpp:248:9: error: no viable conversion from 'const wxString' to 'const wxChar *' (aka 'const wchar_t *')
_("E Sheet, 34 by 44 inches"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/translation.h:39:48: note: expanded from macro '_'
#define _(s) wxGetTranslation((s))
^~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1318:3: note: candidate function
operator wxStringToStdStringRetType() const { return ToStdString(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1320:3: note: candidate function
operator wxStringToStdWstringRetType() const { return ToStdWstring(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1566:5: note: candidate function
operator wxCStrData() const { return c_str(); }
^
wxspagesetupdialog.cpp:249:9: error: no viable conversion from 'const wxString' to 'const wxChar *' (aka 'const wchar_t *')
_("Letter Small, 8 1/2 by 11 inches"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/translation.h:39:48: note: expanded from macro '_'
#define _(s) wxGetTranslation((s))
^~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1318:3: note: candidate function
operator wxStringToStdStringRetType() const { return ToStdString(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1320:3: note: candidate function
operator wxStringToStdWstringRetType() const { return ToStdWstring(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1566:5: note: candidate function
operator wxCStrData() const { return c_str(); }
^
wxspagesetupdialog.cpp:250:9: error: no viable conversion from 'const wxString' to 'const wxChar *' (aka 'const wchar_t *')
_("Tabloid, 11 by 17 inches"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/translation.h:39:48: note: expanded from macro '_'
#define _(s) wxGetTranslation((s))
^~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1318:3: note: candidate function
operator wxStringToStdStringRetType() const { return ToStdString(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1320:3: note: candidate function
operator wxStringToStdWstringRetType() const { return ToStdWstring(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1566:5: note: candidate function
operator wxCStrData() const { return c_str(); }
^
wxspagesetupdialog.cpp:251:9: error: no viable conversion from 'const wxString' to 'const wxChar *' (aka 'const wchar_t *')
_("Ledger, 17 by 11 inches"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/translation.h:39:48: note: expanded from macro '_'
#define _(s) wxGetTranslation((s))
^~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1318:3: note: candidate function
operator wxStringToStdStringRetType() const { return ToStdString(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1320:3: note: candidate function
operator wxStringToStdWstringRetType() const { return ToStdWstring(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1566:5: note: candidate function
operator wxCStrData() const { return c_str(); }
^
wxspagesetupdialog.cpp:252:9: error: no viable conversion from 'const wxString' to 'const wxChar *' (aka 'const wchar_t *')
_("Statement, 5 1/2 by 8 1/2 inches"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/translation.h:39:48: note: expanded from macro '_'
#define _(s) wxGetTranslation((s))
^~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1318:3: note: candidate function
operator wxStringToStdStringRetType() const { return ToStdString(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1320:3: note: candidate function
operator wxStringToStdWstringRetType() const { return ToStdWstring(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1566:5: note: candidate function
operator wxCStrData() const { return c_str(); }
^
wxspagesetupdialog.cpp:253:9: error: no viable conversion from 'const wxString' to 'const wxChar *' (aka 'const wchar_t *')
_("Executive, 7 1/4 by 10 1/2 inches"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/translation.h:39:48: note: expanded from macro '_'
#define _(s) wxGetTranslation((s))
^~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1318:3: note: candidate function
operator wxStringToStdStringRetType() const { return ToStdString(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1320:3: note: candidate function
operator wxStringToStdWstringRetType() const { return ToStdWstring(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1566:5: note: candidate function
operator wxCStrData() const { return c_str(); }
^
wxspagesetupdialog.cpp:254:9: error: no viable conversion from 'const wxString' to 'const wxChar *' (aka 'const wchar_t *')
_("A3 sheet, 297 by 420 millimeters"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/translation.h:39:48: note: expanded from macro '_'
#define _(s) wxGetTranslation((s))
^~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1318:3: note: candidate function
operator wxStringToStdStringRetType() const { return ToStdString(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1320:3: note: candidate function
operator wxStringToStdWstringRetType() const { return ToStdWstring(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1566:5: note: candidate function
operator wxCStrData() const { return c_str(); }
^
wxspagesetupdialog.cpp:255:9: error: no viable conversion from 'const wxString' to 'const wxChar *' (aka 'const wchar_t *')
_("A4 small sheet, 210 by 297 millimeters"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/translation.h:39:48: note: expanded from macro '_'
#define _(s) wxGetTranslation((s))
^~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1318:3: note: candidate function
operator wxStringToStdStringRetType() const { return ToStdString(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1320:3: note: candidate function
operator wxStringToStdWstringRetType() const { return ToStdWstring(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1566:5: note: candidate function
operator wxCStrData() const { return c_str(); }
^
wxspagesetupdialog.cpp:256:9: error: no viable conversion from 'const wxString' to 'const wxChar *' (aka 'const wchar_t *')
_("A5 sheet, 148 by 210 millimeters"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/translation.h:39:48: note: expanded from macro '_'
#define _(s) wxGetTranslation((s))
^~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1318:3: note: candidate function
operator wxStringToStdStringRetType() const { return ToStdString(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1320:3: note: candidate function
operator wxStringToStdWstringRetType() const { return ToStdWstring(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1566:5: note: candidate function
operator wxCStrData() const { return c_str(); }
^
wxspagesetupdialog.cpp:257:9: error: no viable conversion from 'const wxString' to 'const wxChar *' (aka 'const wchar_t *')
_("B4 sheet, 250 by 354 millimeters"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/translation.h:39:48: note: expanded from macro '_'
#define _(s) wxGetTranslation((s))
^~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1318:3: note: candidate function
operator wxStringToStdStringRetType() const { return ToStdString(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1320:3: note: candidate function
operator wxStringToStdWstringRetType() const { return ToStdWstring(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1566:5: note: candidate function
operator wxCStrData() const { return c_str(); }
^
wxspagesetupdialog.cpp:258:9: error: no viable conversion from 'const wxString' to 'const wxChar *' (aka 'const wchar_t *')
_("B5 sheet, 182-by-257-millimeter paper"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/translation.h:39:48: note: expanded from macro '_'
#define _(s) wxGetTranslation((s))
^~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1318:3: note: candidate function
operator wxStringToStdStringRetType() const { return ToStdString(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1320:3: note: candidate function
operator wxStringToStdWstringRetType() const { return ToStdWstring(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1566:5: note: candidate function
operator wxCStrData() const { return c_str(); }
^
wxspagesetupdialog.cpp:259:9: error: no viable conversion from 'const wxString' to 'const wxChar *' (aka 'const wchar_t *')
_("Folio, 8-1/2-by-13-inch paper"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/translation.h:39:48: note: expanded from macro '_'
#define _(s) wxGetTranslation((s))
^~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1318:3: note: candidate function
operator wxStringToStdStringRetType() const { return ToStdString(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1320:3: note: candidate function
operator wxStringToStdWstringRetType() const { return ToStdWstring(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1566:5: note: candidate function
operator wxCStrData() const { return c_str(); }
^
wxspagesetupdialog.cpp:260:9: error: no viable conversion from 'const wxString' to 'const wxChar *' (aka 'const wchar_t *')
_("Quarto, 215-by-275-millimeter paper"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/translation.h:39:48: note: expanded from macro '_'
#define _(s) wxGetTranslation((s))
^~~~~~~~~~~~~~~~~~~~~
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1318:3: note: candidate function
operator wxStringToStdStringRetType() const { return ToStdString(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1320:3: note: candidate function
operator wxStringToStdWstringRetType() const { return ToStdWstring(); }
^
/…/CodeBlocks/wxwidgets-code/include/wx/string.h:1566:5: note: candidate function
operator wxCStrData() const { return c_str(); }
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[6]: *** [wxspagesetupdialog.lo] Error 1
make[6]: *** Waiting for unfinished jobs....
make[5]: *** [all-recursive] Error 1
Without the paramter: --enable-stl
I'm back with the olds errors:
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
make[3]: *** [install-recursive] Error 1
make[2]: *** [install-recursive] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1…
Here the offending code (lines: 126, 130, 135, 140)
/…/codeblocks-code/src/plugins/contrib/wxSmithContribItems/wxthings/wxscustombutton.cpp
The Codef functions are define here (line 471)
/…/codeblocks-code/src/plugins/contrib/wxSmith/wxwidgets/wxsitem.cpp
In wxscustombutton.cpp to fix the errors: I have add wx_str() to wxART_OTHER.
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());
The building process works.
The bundle process have some errors:
/…/CodeBlocks/bin/codeblocks/lib/codeblocks/plugins/libwxSmithAui.dylib
Copying @loader_path/libwxSmithAui.dylib
cp: @loader_path/libwxSmithAui.dylib: No such file or directory
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: CodeBlocks.app/Contents/MacOS/libwxSmithAui.dylib (No such file or directory)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool-classic: can't open file: CodeBlocks.app/Contents/MacOS/libwxSmithAui.dylib (No such file or directory)
Copying /…/CodeBlocks/bin/codeblocks/lib/libwxsmithlib.0.dylib
/…/CodeBlocks/bin/codeblocks/lib/codeblocks/plugins/libwxsmith.dylib
Copying @loader_path/libwxsmith.dylib
cp: @loader_path/libwxsmith.dylib: No such file or directory
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: CodeBlocks.app/Contents/MacOS/libwxsmith.dylib (No such file or directory)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool-classic: can't open file: CodeBlocks.app/Contents/MacOS/libwxsmith.dylib (No such file or directory)
/…/CodeBlocks/bin/codeblocks/lib/codeblocks/plugins/libwxsmithcontribitems.dylib
Copying @loader_path/libwxsmithcontribitems.dylib
cp: @loader_path/libwxsmithcontribitems.dylib: No such file or directory
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: CodeBlocks.app/Contents/MacOS/libwxsmithcontribitems.dylib (No such file or directory)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool-classic: can't open file: CodeBlocks.app/Contents/MacOS/libwxsmithcontribitems.dylib (No such file or directory)…
All the plugin are in the same path:
/…/CodeBlocks/bin/codeblocks/share/codeblocks/
/…/CodeBlocks/bin/codeblocks/lib/codeblocks/plugins/
Ex:
/…/CodeBlocks/bin/codeblocks/share/codeblocks/wxsmith.zip
/…/CodeBlocks/bin/codeblocks/lib/codeblocks/plugins/libwxsmith.dylib
And CB doesn't work very well.
I can't click on the CB/Mac top menu.
There no compilers, no plugin…
OO yes. That's it.
I forgot the make install (not in my script).
It's work :).
Thank you oBFusCATed for your help.
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.4 (Unicode: wchar_t, debug level: 0),
compiled at Jan 7 2021 14:31:38
Runtime version of toolkit used is 10.15.
There some minor problems:
The zoom is initiate with a very small value.
And the second one the compiler say :
warning: include location '/usr/local/include' is unsafe for cross-compilation [-Wpoison-system-directories]
I have try my modification of wxscustombuttom.cpp under Mageia7 with gcc8, wx 3.0.4 and CB commit: 12281 .
wxART_ORTHER_C is not a wxString but a const char [14].
wxthings/wxscustombutton.cpp: Dans la fonction membre « virtual void wxsCustomButton::OnBuildCreatingCode() »:
wxthings/wxscustombutton.cpp:126:98: error: requête du membre « wx_str » dans « ("wxART_OTHER_C") », lequel est de type non classe « const char [14] »
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());
^~~~~~
wxthings/wxscustombutton.cpp:130:86: error: requête du membre « wx_str » dans « ("wxART_OTHER_C") », lequel est de type non classe « const char [14] »
Codef(_T("%ASetBitmapSelected(%i);\n"),&m_BitmapSelected,wxART_OTHER.wx_str());
^~~~~~
wxthings/wxscustombutton.cpp:135:82: error: requête du membre « wx_str » dans « ("wxART_OTHER_C") », lequel est de type non classe « const char [14] »
Codef(_T("%ASetBitmapFocus(%i);\n"),&m_BitmapFocused,wxART_OTHER.wx_str());
^~~~~~
wxthings/wxscustombutton.cpp:140:86: error: requête du membre « wx_str » dans « ("wxART_OTHER_C") », lequel est de type non classe « const char [14] »
Codef(_T("%ASetBitmapDisabled(%i);\n"),&m_BitmapDisabled,wxART_OTHER.wx_str());
^~~~~~
make[4]: *** [Makefile:902: wxthings/wxscustombutton.lo] Error 1
I use wxWidgets v3.1.4
git clone https://github.com/wxWidgets/wxWidgets.git wxwidgets-code
cd wxwidgets-code
git checkout "tags/v3.1.4"
git submodule update --init --recursive
git log
commit 6cdaedd42ba59331b3dc4ead50e0bac76ae14c19 (HEAD, tag: v3.1.4)
Author: Vadim Zeitlin <vadim@wxwidgets.org>
Date: Wed Jul 22 19:20:06 2020 +0200
Fill in the binaries SHA-1 checksums
I have use the same script on Mageia7. I have remove the macos references.
And all work perfectly.
gcc version:
gcc (Mageia 8.4.0-1.mga7) 8.4.0
g++ (Mageia 8.4.0-1.mga7) 8.4.0
wxwidgets version:
commit 6cdaedd42ba59331b3dc4ead50e0bac76ae14c19 (HEAD, tag: v3.1.4)
Author: Vadim Zeitlin <vadim@wxwidgets.org>
Date: Wed Jul 22 19:20:06 2020 +0200
Fill in the binaries SHA-1 checksums
Codeblocrs build info:
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 (wxGTK port)
Version 3.1.4 (Unicode: wchar_t, debug level: 0),
compiled at Jan 7 2021 23:30:48
Runtime version of toolkit used is 3.24.
Compile-time GTK+ version is 3.24.8.
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.
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
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.
I have retry to build with wxWidgets tags\v3.1.4
I have the same errors
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):
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.