-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macOS Qt compilation errors apparently due to incorrect C++ standard #51
Comments
Did you followed the instructions from BuildWithCMake wiki page? I never experienced such errors when compiling SoQt or Quarter. |
Close to it, but not exactly... e.g., I didn't clone Quarter from the repo, I just downloaded latest, and Coin3d was installed with Homebrew, again not cloned/built from the repo. I was able to compile SoXt using those instructions, but then lost track of the page, thanks for the link! Oh, and I just see the default version of Qt in Homebrew is 6, not 5... that's probably the main problem. I'll try explicitly pointing at Qt5. Thanks. Edit: actually I take that back, at one point I did explicitly point it at Qt 5.15.2... sorry tried so many things I lost track. Anyway, I'll try to exactly replicate the steps on that page. |
Ok, I tried the steps in BuildWithCmake exactly. Same result... only difference at this point I believe is that Coin3d is from Homebrew and not cloned/built myself. Note the Apple compiler is 11.0.3... so a little out of date. I didn't include the initial cmake output before: -- The CXX compiler identification is AppleClang 11.0.3.11030032
|
Back on track. Can you have a look into Quarter's github actions script? Under section macos-latest (according to documentation this means macOS 10.15 at present time) Quarter is build against the latest Qt5 version (5.15.2) with the default compiler (clang). Please check whether your build command is similar to this. You might need to download the Coin 4.0.0 version build on macos-latest from the CI builds section. Hope that gets you further. |
I'm trying to get Quarter to compile under macOS 10.15.7 (after running into X11 library issues with SoXt).
I have Coin3d installed via Homebrew, apparently version 4.0.0_1. I first tried automake configure, but that failed, then cmake. Cmake gets further, but I get a ton of Qt related compilation errors (see below) which appear to be due to the use of recent c++ language features. I tried setting the CXX_STANDARD in the CMakeLists.txt file and also setting the c++ standard also in Qmake .pro files but neither had any effect.
Any guidance would be much appreciated. Thanks!
make
[ 1%] Generating moc_SignalThread.cpp
[ 2%] Generating //include/Quarter/eventhandlers/moc_DragDropHandler.cpp
[ 4%] Generating //include/Quarter/eventhandlers/moc_EventFilter.cpp
[ 5%] Generating //include/Quarter/eventhandlers/moc_FocusHandler.cpp
[ 7%] Generating //include/Quarter/moc_QuarterWidget.cpp
[ 8%] Generating moc_ContextMenu.cpp
[ 10%] Generating moc_InteractionMode.cpp
[ 11%] Generating moc_SensorManager.cpp
[ 13%] Building CXX object src/Quarter/CMakeFiles/Quarter.dir/ContextMenu.cpp.o
In file included from /Users//Packages/src/quarter/src/Quarter/ContextMenu.cpp:34:
In file included from /Users//Packages/src/quarter/src/Quarter/ContextMenu.h:36:
In file included from /Users//Packages/homebrew/Cellar/qt@5/5.15.2/lib/QtCore.framework/Headers/QObject:1:
In file included from /Users//Packages/homebrew/Cellar/qt@5/5.15.2/lib/QtCore.framework/Headers/qobject.h:46:
In file included from /Users//Packages/homebrew/include/QtCore/qobjectdefs.h:48:
In file included from /Users//Packages/homebrew/include/QtCore/qnamespace.h:44:
/Users//Packages/homebrew/include/QtCore/qglobal.h:675:26: error: no template named 'enable_if_t' in namespace 'std'; did you mean
'enable_if'?
typename = std::enable_if_t<std::is_arithmetic_v && std::is_arithmetic_v &&
~~~~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:451:63: note: 'enable_if'
declared here
template <bool, class _Tp = void> struct _LIBCPP_TEMPLATE_VIS enable_if {};
^
In file included from /Users//Packages/src/quarter/src/Quarter/ContextMenu.cpp:34:
In file included from /Users//Packages/src/quarter/src/Quarter/ContextMenu.h:36:
In file included from /Users//Packages/homebrew/Cellar/qt@5/5.15.2/lib/QtCore.framework/Headers/QObject:1:
In file included from /Users//Packages/homebrew/Cellar/qt@5/5.15.2/lib/QtCore.framework/Headers/qobject.h:46:
In file included from /Users//Packages/homebrew/include/QtCore/qobjectdefs.h:48:
In file included from /Users//Packages/homebrew/include/QtCore/qnamespace.h:44:
/Users//Packages/homebrew/include/QtCore/qglobal.h:675:43: error: no template named 'is_arithmetic_v' in namespace 'std'; did you mean
'is_arithmetic'?
typename = std::enable_if_t<std::is_arithmetic_v && std::is_arithmetic_v &&
The text was updated successfully, but these errors were encountered: