Dear all,
I am trying to install geant4 v11.0.0 in my 2019 MacBook Pro (macOS Monterey) with qt enabled. But I have been getting the following errors
/usr/local/Cellar/qt@5/5.15.2_1/lib/QtGui.framework/Headers/qpixmap.h:134:31: error: unknown type name ‘QMatrix’
QPixmap transformed(const QMatrix &, Qt::TransformationMode mode = Qt::FastTransformation) const;
^
/usr/local/Cellar/qt@5/5.15.2_1/lib/QtGui.framework/Headers/qpixmap.h:136:12: error: unknown type name ‘QMatrix’
static QMatrix trueMatrix(const QMatrix &m, int w, int h);
^
/usr/local/Cellar/qt@5/5.15.2_1/lib/QtGui.framework/Headers/qpixmap.h:136:37: error: unknown type name ‘QMatrix’
static QMatrix trueMatrix(const QMatrix &m, int w, int h);
^
I have been trying to resolve this since quite a long time, but I didn’t get any success till now. It would be really nice if someone could help me with it.
I see you have CMAKE_PREFIX_PATH twice. Not sure that’s OK - the second supersedes the first, I suspect. I would put -DCMAKE_PREFIX_PATH="/usr/local/Cellar/xerces-c/3.2.3;/usr/local/Cellar/qt@5/5.15.2_1/lib/cmake"
Hi, I have brew qt6 installed.
One more information, if I build geant4 with gcc and g++ then I don’t get this error(qt). However I get an error message while running basic example B1.
It’s possible that having the main qt (6) Formula installed is causing the build to pick up headers from this ahead of the qt@5 “keg only” that CMake found. Might be that /usr/local is appearing earlier in the include path.
I would try brew unlink qt and then try rebuilding Geant4 (you shouldn’t need to reconfigure, just rebuild). That should diagnose whether this is the case or not.
Note that we don’t test or support building/using Geant4 with GCC on macOS at the moment, so I’d go back to using the system Clang.
hi Morgan,
Thank you so much for the reply. Unlinking qt worked and I could build geant4 with qt enabled using clang.
Now I can run the examples smoothly