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

Compilation fails in Centos 7.5 with gcc 4.8.5 #239

Closed nib0 closed 6 years ago

nib0 commented 6 years ago

When trying to compile openhantek using the latest Centos release, the compilation fails with the following error messages:

openhantek/openhantek/src/hantekdso/hantekdsocontrol.cpp:1226:24: error: missing binary operator before token "("
 #if __has_cpp_attribute(clang::fallthrough)
                        ^
openhantek/openhantek/src/hantekdso/hantekdsocontrol.cpp:1228:26: error: missing binary operator before token "("
 #elif __has_cpp_attribute(fallthrough)
                          ^
make[2]: *** [openhantek/CMakeFiles/OpenHantek.dir/src/hantekdso/hantekdsocontrol.cpp.o] Error 1
make[1]: *** [openhantek/CMakeFiles/OpenHantek.dir/all] Error 2
make: *** [all] Error 2

The compilation can be successfull and the program runs without any problems if the following statements are commented out in hantekdsocontrol.cpp:

//#if __has_cpp_attribute(clang::fallthrough)
//#define FALLTHROUGH [[clang::fallthrough]];
//#elif __has_cpp_attribute(fallthrough)
//#define FALLTHROUGH [[fallthrough]];
//#else
#define FALLTHROUGH
//#endif

FALLTHROUGH is only used at this point, so commenting out the if statements does not seem to affect anything.

Vascom commented 6 years ago

@nbogiatzoglou Now you can install openhantek from rpmfusion repo http://koji.rpmfusion.org/koji/buildinfo?buildID=7846

nib0 commented 6 years ago

@Vascom Thanks for the info!