- This topic has 1 reply, 2 voices, and was last updated 9 years ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Home › Forum › SOFA › Building SOFA › [SOLVED] build with Qt on MacOs
Tagged: macos qt
Hi,
I recently got into trouble compiling sofa (master branch) on MacOS:
In file included from /Users/ffaure/scm/SOFA/sofa-build-debug/SofaGui/SofaGuiQt/moc_AddObject.cpp:9:
In file included from /Users/ffaure/scm/SOFA/sofa-build-debug/SofaGui/SofaGuiQt/../../../sofa/applications/sofa/gui/qt/AddObject.h:29:
In file included from /Users/ffaure/scm/SOFA/sofa-build-debug/SofaGui/SofaGuiQt/ui_DialogAddObject.h:13:
In file included from /Library/Qt5/5.4/clang_64/lib/QtWidgets.framework/Headers/QAction:1:
In file included from /Library/Qt5/5.4/clang_64/lib/QtWidgets.framework/Headers/qaction.h:39:
In file included from /Library/Qt5/5.4/clang_64/lib/QtWidgets.framework/Headers/qwidget.h:45:
/Library/Qt5/5.4/clang_64/lib/QtWidgets.framework/Headers/qsizepolicy.h:44:24: error: variable has incomplete type 'class Q_WIDGETS_EXPORT'
class Q_WIDGETS_EXPORT QSizePolicy
and a bunch of similar errors. This was due to some mix of Qt4 and Qt5. Here is how to fix this:
sudo port uninstall qt4-mac
Thanks François.
For those like me using homebrew to install qt5, set Qt5_DIR to /usr/local/Cellar/qt5/5.5.1_1/lib/cmake/Qt5.
(tested on a fresh OSX with not other Qt install before)
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.