OpenHantek / openhantek

OpenHantek is a DSO software for Hantek (Voltcraft/Darkwire/Protek/Acetech) USB digital signal oscilloscopes
http://openhantek.org/
GNU General Public License v3.0
771 stars 199 forks source link

Difficulty compiling on OSX Mojave with latest Qt5? #280

Closed HughAndersonNUS closed 5 years ago

HughAndersonNUS commented 5 years ago

Hi, This is my foorst time trying to compile this software. I followed all the steps for installing on MacOS, but when it compiles, I get a series of errors, starting with:

`[ 8%] Building CXX object openhantek/CMakeFiles/OpenHantek.dir/src/configdialog/DsoConfigColorsPage.cpp.o In file included from /Users/hugh/Downloads/openhantek-master/openhantek/src/configdialog/DsoConfigAnalysisPage.cpp:3: In file included from /Users/hugh/Downloads/openhantek-master/openhantek/src/configdialog/DsoConfigAnalysisPage.h:3: In file included from /usr/local/Cellar/qt/5.12.0/lib/QtWidgets.framework/Headers/QWidget:1: In file included from /usr/local/Cellar/qt/5.12.0/lib/QtWidgets.framework/Headers/qwidget.h:52: /usr/local/Cellar/qt/5.12.0/lib/QtWidgets.framework/Headers/qsizepolicy.h:51:82: error: In file included from invalid/Users/hugh/Downloads/openhantek-master/openhantek/src/configdialog/DsoConfigColorsPage.cpp :token 3at: In file included from start/Users/hugh/Downloads/openhantek-master/openhantek/src/configdialog/DsoConfigColorsPage.h :of3 : aIn file included from /usr/local/Cellar/qt/5.12.0/lib/QtWidgets.framework/Headers/QWidgetpreprocessor: 1expression: In file included from /usr/local/Cellar/qt/5.12.0/lib/QtWidgets.framework/Headers/qwidget.h:52: /usr/local/Cellar/qt/5.12.0/lib/QtWidgets.framework/Headers/qsizepolicy.h:51:82: error: invalid token at start of a preprocessor expression

if !defined(Q_CC_GNU) || defined(Q_CC_INTEL) || defined(Q_CC_CLANG) || Q_CC_GNU >= 408

                                                                             ^

if !defined(Q_CC_GNU) || defined(Q_CC_INTEL) || defined(Q_CC_CLANG) || Q_CC_GNU >= 408

                                                                             ^

/usr/local/Cellar/qt/5.12.0/lib/QtWidgets.framework/Headers/qsizepolicy.h:68:1: error: unknown type name 'Q_DECL_CONST_FUNCTION' Q_DECL_CONST_FUNCTION inline uint qHash(QSizePolicy key, uint seed = 0) Q_DECL_NOTHROW; ` ... and then there are mnay more similar errors. Can someone point me in the correct direction?

Regards Hugh

HughAndersonNUS commented 5 years ago

Hi, In the end, this turned out to be an issue with having QT4 also installed at the same time as QT5. Removing QT4 resolved the issue. Cheers Hugh