silicon-heaven / shvspy

0 stars 7 forks source link

Error by compiling shvspy #23

Closed robertobucher closed 1 year ago

robertobucher commented 1 year ago

I tried to compile shvspy in the usual way that I've used till now:

git clone https://github.com/silicon-heaven/shvspy shvspy cd shvspy git submodule update --init --recursive mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=.. -DUSE_QT6=OFF .. make

but I get the following error:

/home/bucher/sviluppo/GITHUB/pysimCoder/SHV/shvspy/shvspy/src/dlgaddedituser.cpp:48:22: error: ‘QByteArrayView’ was not declared in this scope; did you mean ‘QByteArrayList’? 48 | hash.addData(QByteArrayView(s.data(), s.length())); | ^~~~~~ | QByteArrayList make[3]: *** [shvspy/CMakeFiles/shvspy.dir/build.make:195: shvspy/CMakeFiles/shvspy.dir/src/dlgaddedituser.cpp.o] Error 1

Any idea?

Thanks in advance

robertobucher commented 1 year ago

I reached to avoid errors by compiling using QT6. The problem exists only when we compile using

cmake -DCMAKE_INSTALL_PREFIX=.. -DUSE_QT6=OFF ..

fvacek commented 1 year ago

QByteArrayView requires Qt >= 6.3, see https://github.com/silicon-heaven/libshv/commit/e0168b9cc6024b60ce4d12d1a21f6b2ba463a59f

fvacek commented 1 year ago

please try this https://github.com/silicon-heaven/shvspy/commit/5f20dd3d5c5beb7359dc2544abf6d17dd6eee77c , current shvspy master

fvacek commented 1 year ago

Have you considered to use pure python shv implementation? https://gitlab.com/elektroline-predator/pyshv/-/tree/master