Re: Xcode 12.4 requires c++17?
Posted by
dxli on
Jun 13, 2023; 3:38pm
URL: https://forum.librecad.org/Xcode-12-4-requires-c-17-tp5722934p5722936.html
My qglobal.h for Qt-5.15.9 doesn't require C++17.
Anyway, please try c++17:
in the LibreCAD top folder, edit the file common.pri
from
QMAKE_CFLAGS = -std=c++1y
to
QMAKE_CFLAGS = -std=c++1z
kenr wrote
I thought to download and build LibreCAD on my iMac today, 6/12/2023. This encountered a problem looking for C++17 as shown below. I am running OS X version 10.15.7 (Catalina) which is the latest available to me on this old machine. I am running the latest Xcode also available to me which appears to be c++17 compliant.
About xcode shows Version 12.4 (12D4e)
I feel this ought to work and that I am not selecting the proper compiler.
Could that be?
Should I try to fall back to an earlier LibreCAD, or try something else?
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -g -std=c++1y -O2 -std=gnu++1y -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk -mmacosx-version-min=10.13 -Wall -Wextra -fPIC -DDWGSUPPORT -DQC_APPDIR="LibreCAD" -DLC_VERSION="2.2.0-alpha" -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/local/include -I../../libraries/muparser/include -I../../libraries/libdxfrw/src -I../../libraries/jwwlib/src -Icmd -Ilib/actions -Ilib/creation -Ilib/debug -Ilib/engine -Ilib/fileio -Ilib/filters -Ilib/generators -Ilib/gui -Ilib/information -Ilib/math -Ilib/modification -Ilib/printing -Iactions -Imain -Imain/console_dxf2pdf -Itest -Iplugins -Iui -Iui/forms -Iui/generic -I../res -I/usr/local/Cellar/qt@5/5.15.9/lib/QtSvg.framework/Headers -I/usr/local/Cellar/qt@5/5.15.9/lib/QtPrintSupport.framework/Headers -I/usr/local/Cellar/qt@5/5.15.9/lib/QtWidgets.framework/Headers -I/usr/local/Cellar/qt@5/5.15.9/lib/QtGui.framework/Headers -I/usr/local/Cellar/qt@5/5.15.9/lib/QtCore.framework/Headers -I../../generated/librecad/moc -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/AGL.framework/Headers -I../../generated/librecad/ui -I/usr/local/Cellar/qt@5/5.15.9/mkspecs/macx-clang -F/usr/local/Cellar/qt@5/5.15.9/lib -o ../../generated/librecad/obj/rs_snapper.o lib/actions/rs_snapper.cpp
In file included from lib/actions/rs_actioninterface.cpp:27:
In file included from lib/gui/rs_graphicview.h:34:
In file included from /usr/local/Cellar/qt@5/5.15.9/lib/QtWidgets.framework/Headers/QAction:1:
In file included from /usr/local/Cellar/qt@5/5.15.9/lib/QtWidgets.framework/Headers/qaction.h:43:
In file included from /usr/local/include/QtWidgets/qtwidgetsglobal.h:7:
In file included from /usr/local/include/QtGui/qtguiglobal.h:7:
/usr/local/include/QtCore/qglobal.h:106:6: error:
"Qt requires a C++17 compiler"
# error "Qt requires a C++17 compiler"
^