josevcm / nfc-laboratory

NFC signal and protocol analyzer using SDR receiver
GNU General Public License v3.0
410 stars 46 forks source link

Problem vith build on Manjaro Linux #39

Open iphizic opened 4 hours ago

iphizic commented 4 hours ago

Hello, I try build nfc-laboratory on manjaro and have this error:

[ 25%] Built target mufft
[ 26%] Building CXX object src/nfc-lib/lib-rt/rt-lang/CMakeFiles/rt-lang.dir/src/main/cpp/Tokenizer.cpp.o
[ 26%] Building CXX object src/nfc-lib/lib-rt/rt-lang/CMakeFiles/rt-lang.dir/src/main/cpp/Logger.cpp.o
/home/iphizic/build/nfc-laboratory/src/nfc-lib/lib-rt/rt-lang/src/main/cpp/Logger.cpp: In function ‘int rt::getLevelIndex(std::string)’:
/home/iphizic/build/nfc-laboratory/src/nfc-lib/lib-rt/rt-lang/src/main/cpp/Logger.cpp:58:9: error: ‘transform’ is not a member of ‘std’
   58 |    std::transform(name.begin(), name.end(), name.begin(), toupper);
      |         ^~~~~~~~~
make[3]: *** [src/nfc-lib/lib-rt/rt-lang/CMakeFiles/rt-lang.dir/build.make:174: src/nfc-lib/lib-rt/rt-lang/CMakeFiles/rt-lang.dir/src/main/cpp/Logger.cpp.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/Makefile2:1258: src/nfc-lib/lib-rt/rt-lang/CMakeFiles/rt-lang.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:581: src/nfc-app/app-qt/CMakeFiles/nfc-spy.dir/rule] Error 2
make: *** [Makefile:124: nfc-spy] Error 2
josevcm commented 4 hours ago

what version of gcc are you using? must be 11 or higer, check this output when configure CMAKE:

user@LG:~$ cmake -DCMAKE_BUILD_TYPE=Release -S nfc-laboratory -B cmake-build-release -- The C compiler identification is GNU 11.4.0 -- The CXX compiler identification is GNU 11.4.0

Anyway I added include in Logger.cpp, please check again