edrosten / libblepp

Modern clean C++ Bluetooth Low Energy on Linux without the Bluez DBUS API
Other
239 stars 62 forks source link

compile error with clang #27

Closed xqp closed 6 years ago

xqp commented 6 years ago

Hey,

i have compile errors when i try to compile your library with clang.

my setup:

~/projects/libblepp$ make [ 50%] Built target ble++ [ 60%] Built target lescan [ 70%] Built target lescan_simple [ 80%] Built target blelogger Scanning dependencies of target bluetooth [ 85%] Building CXX object CMakeFiles/bluetooth.dir/examples/bluetooth.cc.o In file included from /home/ctor/projects/libblepp/examples/bluetooth.cc:32: In file included from /home/ctor/projects/libblepp/cxxgplot.h:1: /home/ctor/projects/libblepp/pstreams/pstream.h:1820:28: error: return type of out-of-line definition of 'redi::basic_pstreambuf::wpipe' differs from that in the declaration basic_pstreambuf<C,T>::wpipe() ^ /home/ctor/projects/libblepp/pstreams/pstream.h:219:7: note: previous declaration is here wpipe(); ^ /home/ctor/projects/libblepp/pstreams/pstream.h:1828:28: error: return type of out-of-line definition of 'redi::basic_pstreambuf::rpipe' differs from that in the declaration basic_pstreambuf<C,T>::rpipe() ^ /home/ctor/projects/libblepp/pstreams/pstream.h:223:7: note: previous declaration is here rpipe(); ^ /home/ctor/projects/libblepp/pstreams/pstream.h:1836:28: error: return type of out-of-line definition of 'redi::basic_pstreambuf::rpipe' differs from that in the declaration basic_pstreambuf<C,T>::rpipe(buf_read_src which) ^ /home/ctor/projects/libblepp/pstreams/pstream.h:227:7: note: previous declaration is here rpipe(buf_read_src which); ^ 3 errors generated. CMakeFiles/bluetooth.dir/build.make:62: recipe for target 'CMakeFiles/bluetooth.dir/examples/bluetooth.cc.o' failed make[2]: *** [CMakeFiles/bluetooth.dir/examples/bluetooth.cc.o] Error 1 CMakeFiles/Makefile2:215: recipe for target 'CMakeFiles/bluetooth.dir/all' failed make[1]: *** [CMakeFiles/bluetooth.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: *** [all] Error 2 i've solved this problem locally by updating pstreams version 1.0.1

best regards xqp

edrosten commented 6 years ago

Fixed from PR