JibbSmart / JoyShockMapper

A tool for PC gamers to play games with DualShock 4, DualSense, JoyCon, and Switch Pro Controllers. Gyro aiming, flick stick.
Other
786 stars 67 forks source link

I get this error when trying to compile it with cmake in linux #119

Open linusrg1 opened 3 years ago

linusrg1 commented 3 years ago

-- Checking for one of the modules 'appindicator3-0.1' -- Checking for one of the modules 'libevdev' -- JSM version is v2.0.3 -- CPM: adding package JoyShockLibrary@2.0.1 (v2.0.1) -- Checking for one of the modules 'hidapi-hidraw' -- CPM: adding package magic_enum@0.6.6 (v0.6.6) -- Configuring done -- Generating done -- Build files have been written to: /home/linus/JoyShockMapper/build Scanning dependencies of target JoyShockLibrary [ 8%] Building CXX object _deps/joyshocklibrary-build/JoyShockLibrary/CMakeFiles/JoyShockLibrary.dir/JoyShockLibrary.cpp.o /home/linus/JoyShockMapper/build/_deps/joyshocklibrary-src/JoyShockLibrary/JoyShockLibrary.cpp:64:41: warning: format specifies type 'int' but the argument has type 'hid_device ' (aka 'hiddevice ') [-Wformat] printf("Controller %d timed out\n", jc->handle); ~~ ^~~~~~ /home/linus/JoyShockMapper/build/_deps/joyshocklibrary-src/JoyShockLibrary/JoyShockLibrary.cpp:78:61: warning: format specifies type 'int' but the argument has type 'hid_device ' (aka 'hiddevice ') [-Wformat] printf("Attempting to re-initialise controller %d\n", jc->handle); ~~ ^~~~~~ /home/linus/JoyShockMapper/build/_deps/joyshocklibrary-src/JoyShockLibrary/JoyShockLibrary.cpp:86:61: warning: format specifies type 'int' but the argument has type 'hid_device ' (aka 'hiddevice ') [-Wformat] printf("Attempting to re-initialise controller %d\n", jc->handle); ~~ ^~~~~~ 3 warnings generated. [ 16%] Linking CXX static library libJoyShockLibrary.a [ 16%] Built target JoyShockLibrary Scanning dependencies of target JoyShockMapper [ 25%] Building CXX object JoyShockMapper/CMakeFiles/JoyShockMapper.dir/src/main.cpp.o /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:255:10: error: no matching conversion for functional-style cast from 'const char [100]' to 'std::exception' throw exception("ChordStack should always include ButtonID::NONE, for the chorded variable to return the base value."); ^~~~~~~~~~~~~~~~~~~~~~~ /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/exception.h:66:5: note: candidate constructor not viable: no known conversion from 'const char [100]' to 'const std::exception' for 1st argument exception(const exception&) = default; ^ /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/exception.h:68:5: note: candidate constructor not viable: no known conversion from 'const char [100]' to 'std::exception' for 1st argument exception(exception&&) = default; ^ /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/exception.h:63:5: note: candidate constructor not viable: requires 0 arguments, but 1 was provided exception() _GLIBCXX_NOTHROW { } ^ /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:486:11: warning: 4 enumeration values not handled in switch: 'OnTurbo', 'OnTapRelease', 'OnInstantRelease'... [-Wswitch] switch (evt) ^ /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:575:10: warning: enumeration value 'None' not handled in switch [-Wswitch] switch (actMod) ^ /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:604:35: error: second argument to 'va_arg' is of non-POD type 'OnEventAction' (aka 'function<void (DigitalButton *)>') [-Wnon-pod-varargs] auto action = va_arg(arguments, OnEventAction); ^~~~~ /usr/lib64/clang/11.0.0/include/stdarg.h:19:50: note: expanded from macro 'va_arg'

define va_arg(ap, type) __builtin_va_arg(ap, type)

                                             ^~~~

/home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:629:11: warning: 22 enumeration values not handled in switch: 'INVALID', 'NONE', 'LUP'... [-Wswitch] switch (index) { ^ /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:779:12: warning: 57 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_SENS', 'MAX_GYRO_SENS'... [-Wswitch] switch (index) { ^ /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:848:12: warning: 36 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_SENS', 'MAX_GYRO_SENS'... [-Wswitch] switch (index) ^ /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:972:12: warning: 68 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_THRESHOLD', 'MAX_GYRO_THRESHOLD'... [-Wswitch] switch (index) ^ /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:1777:53: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat] printf("Could not open online help. Error #%d\n", err); ~~ ^~~ %lu /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:1933:10: warning: enumeration values 'FORWARD' and 'INVALID' not handled in switch [-Wswitch] switch (controllerOrientation) ^ /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:2217:12: warning: enumeration value 'INVALID' not handled in switch [-Wswitch] switch (controllerOrientation) ^ /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:2269:10: warning: enumeration value 'INVALID' not handled in switch [-Wswitch] switch (gyro.ignore_mode) { ^ /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:2836:30: error: use of undeclared identifier 'cmdLine' currentWorkingDir = string(&cmdLine[0], &cmdLine[wcslen(cmdLine)]); ^ /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:2836:43: error: use of undeclared identifier 'cmdLine' currentWorkingDir = string(&cmdLine[0], &cmdLine[wcslen(cmdLine)]); ^ /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:2836:58: error: use of undeclared identifier 'cmdLine' currentWorkingDir = string(&cmdLine[0], &cmdLine[wcslen(cmdLine)]); ^ /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:779:12: warning: 57 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_SENS', 'MAX_GYRO_SENS'... [-Wswitch] switch (index) { ^ /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:779:12: warning: 57 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_SENS', 'MAX_GYRO_SENS'... [-Wswitch] /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:779:12: warning: 57 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_SENS', 'MAX_GYRO_SENS'... [-Wswitch] /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:779:12: warning: 57 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_SENS', 'MAX_GYRO_SENS'... [-Wswitch] /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:779:12: warning: 57 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_SENS', 'MAX_GYRO_SENS'... [-Wswitch] /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:779:12: warning: 57 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_SENS', 'MAX_GYRO_SENS'... [-Wswitch] /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:779:12: warning: 57 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_SENS', 'MAX_GYRO_SENS'... [-Wswitch] 17 warnings and 5 errors generated. gmake[2]: [JoyShockMapper/CMakeFiles/JoyShockMapper.dir/build.make:82: JoyShockMapper/CMakeFiles/JoyShockMapper.dir/src/main.cpp.o] Error 1 gmake[1]: [CMakeFiles/Makefile2:172: JoyShockMapper/CMakeFiles/JoyShockMapper.dir/all] Error 2 gmake: *** [Makefile:149: all] Error 2 [linus@localhost build]$ cd .. [linus@localhost JoyShockMapper]$ git clone fatal: You must specify a repository to clone.

usage: git clone [] [--] [

]

-v, --verbose         be more verbose
-q, --quiet           be more quiet
--progress            force progress reporting
-n, --no-checkout     don't create a checkout
--bare                create a bare repository
--mirror              create a mirror repository (implies bare)
-l, --local           to clone from a local repository
--no-hardlinks        don't use local hardlinks, always copy
-s, --shared          setup as shared repository
--recurse-submodules[=<pathspec>]
                      initialize submodules in the clone
--recursive ...       alias of --recurse-submodules
-j, --jobs <n>        number of submodules cloned in parallel
--template <template-directory>
                      directory from which templates will be used
--reference <repo>    reference repository
--reference-if-able <repo>
                      reference repository
--dissociate          use --reference only while cloning
-o, --origin <name>   use <name> instead of 'origin' to track upstream
-b, --branch <branch>
                      checkout <branch> instead of the remote's HEAD
-u, --upload-pack <path>
                      path to git-upload-pack on the remote
--depth <depth>       create a shallow clone of that depth
--shallow-since <time>
                      create a shallow clone since a specific time
--shallow-exclude <revision>
                      deepen history of shallow clone, excluding rev
--single-branch       clone only one branch, HEAD or --branch
--no-tags             don't clone any tags, and make later fetches not to follow them
--shallow-submodules  any cloned submodules will be shallow
--separate-git-dir <gitdir>
                      separate git dir from working tree
-c, --config <key=value>
                      set config inside the new repository
--server-option <server-specific>
                      option to transmit
-4, --ipv4            use IPv4 addresses only
-6, --ipv6            use IPv6 addresses only
--filter <args>       object filtering
--remote-submodules   any cloned submodules will use their remote-tracking branch
--sparse              initialize sparse-checkout file to include only files at root

[linus@localhost JoyShockMapper]$ git clone https://github.com/JibbSmart/JoyShockMapper.git fatal: destination path 'JoyShockMapper' already exists and is not an empty directory. [linus@localhost JoyShockMapper]$ cd .. [linus@localhost files]$ cd .. [linus@localhost Trash]$ cd ~ [linus@localhost ~]$ git clone https://github.com/JibbSmart/JoyShockMapper.git Cloning into 'JoyShockMapper'... remote: Enumerating objects: 1650, done. remote: Total 1650 (delta 0), reused 0 (delta 0), pack-reused 1650 Receiving objects: 100% (1650/1650), 1.64 MiB | 499.00 KiB/s, done. Resolving deltas: 100% (1161/1161), done. [linus@localhost ~]$ cd JoyShockMapper/ [linus@localhost JoyShockMapper]$ dir CHANGELOG.md CMakeLists.txt dist LICENSE.md README_中文.md cmake CMakeSettings.json JoyShockMapper README.md script [linus@localhost JoyShockMapper]$ mkdir build [linus@localhost JoyShockMapper]$ cd build [linus@localhost build]$ cmake .. -DCMAKE_CXX_COMPILER=clang++ && cmake --build . -- The CXX compiler identification is Clang 11.0.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/clang++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Checking for one of the modules 'gtk+-3.0' -- Checking for one of the modules 'appindicator3-0.1' -- Checking for one of the modules 'libevdev' -- JSM version is v2.0.3 -- CPM: adding package JoyShockLibrary@2.0.1 (v2.0.1) -- Checking for one of the modules 'hidapi-hidraw' -- CPM: adding package magic_enum@0.6.6 (v0.6.6) -- Configuring done -- Generating done -- Build files have been written to: /home/linus/JoyShockMapper/build Scanning dependencies of target JoyShockLibrary [ 8%] Building CXX object _deps/joyshocklibrary-build/JoyShockLibrary/CMakeFiles/JoyShockLibrary.dir/JoyShockLibrary.cpp.o /home/linus/JoyShockMapper/build/_deps/joyshocklibrary-src/JoyShockLibrary/JoyShockLibrary.cpp:64:41: warning: format specifies type 'int' but the argument has type 'hid_device ' (aka 'hiddevice ') [-Wformat] printf("Controller %d timed out\n", jc->handle); ~~ ^~~~~~ /home/linus/JoyShockMapper/build/_deps/joyshocklibrary-src/JoyShockLibrary/JoyShockLibrary.cpp:78:61: warning: format specifies type 'int' but the argument has type 'hid_device ' (aka 'hiddevice ') [-Wformat] printf("Attempting to re-initialise controller %d\n", jc->handle); ~~ ^~~~~~ /home/linus/JoyShockMapper/build/_deps/joyshocklibrary-src/JoyShockLibrary/JoyShockLibrary.cpp:86:61: warning: format specifies type 'int' but the argument has type 'hid_device ' (aka 'hiddevice ') [-Wformat] printf("Attempting to re-initialise controller %d\n", jc->handle); ~~ ^~~~~~ 3 warnings generated. [ 16%] Linking CXX static library libJoyShockLibrary.a [ 16%] Built target JoyShockLibrary Scanning dependencies of target JoyShockMapper [ 25%] Building CXX object JoyShockMapper/CMakeFiles/JoyShockMapper.dir/src/main.cpp.o /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:255:10: error: no matching conversion for functional-style cast from 'const char [100]' to 'std::exception' throw exception("ChordStack should always include ButtonID::NONE, for the chorded variable to return the base value."); ^~~~~~~~~~~~~~~~~~~~~~~ /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/exception.h:66:5: note: candidate constructor not viable: no known conversion from 'const char [100]' to 'const std::exception' for 1st argument exception(const exception&) = default; ^ /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/exception.h:68:5: note: candidate constructor not viable: no known conversion from 'const char [100]' to 'std::exception' for 1st argument exception(exception&&) = default; ^ /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/exception.h:63:5: note: candidate constructor not viable: requires 0 arguments, but 1 was provided exception() _GLIBCXX_NOTHROW { } ^ /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:486:11: warning: 4 enumeration values not handled in switch: 'OnTurbo', 'OnTapRelease', 'OnInstantRelease'... [-Wswitch] switch (evt) ^ /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:575:10: warning: enumeration value 'None' not handled in switch [-Wswitch] switch (actMod) ^ /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:604:35: error: second argument to 'va_arg' is of non-POD type 'OnEventAction' (aka 'function<void (DigitalButton *)>') [-Wnon-pod-varargs] auto action = va_arg(arguments, OnEventAction); ^~~~~ /usr/lib64/clang/11.0.0/include/stdarg.h:19:50: note: expanded from macro 'va_arg'

define va_arg(ap, type) __builtin_va_arg(ap, type)

                                             ^~~~

/home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:629:11: warning: 22 enumeration values not handled in switch: 'INVALID', 'NONE', 'LUP'... [-Wswitch] switch (index) { ^ /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:779:12: warning: 57 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_SENS', 'MAX_GYRO_SENS'... [-Wswitch] switch (index) { ^ /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:848:12: warning: 36 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_SENS', 'MAX_GYRO_SENS'... [-Wswitch] switch (index) ^ /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:972:12: warning: 68 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_THRESHOLD', 'MAX_GYRO_THRESHOLD'... [-Wswitch] switch (index) ^ /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:1777:53: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat] printf("Could not open online help. Error #%d\n", err); ~~ ^~~ %lu /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:1933:10: warning: enumeration values 'FORWARD' and 'INVALID' not handled in switch [-Wswitch] switch (controllerOrientation) ^ /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:2217:12: warning: enumeration value 'INVALID' not handled in switch [-Wswitch] switch (controllerOrientation) ^ /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:2269:10: warning: enumeration value 'INVALID' not handled in switch [-Wswitch] switch (gyro.ignore_mode) { ^ /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:2836:30: error: use of undeclared identifier 'cmdLine' currentWorkingDir = string(&cmdLine[0], &cmdLine[wcslen(cmdLine)]); ^ /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:2836:43: error: use of undeclared identifier 'cmdLine' currentWorkingDir = string(&cmdLine[0], &cmdLine[wcslen(cmdLine)]); ^ /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:2836:58: error: use of undeclared identifier 'cmdLine' currentWorkingDir = string(&cmdLine[0], &cmdLine[wcslen(cmdLine)]); ^ /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:779:12: warning: 57 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_SENS', 'MAX_GYRO_SENS'... [-Wswitch] switch (index) { ^ /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:779:12: warning: 57 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_SENS', 'MAX_GYRO_SENS'... [-Wswitch] /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:779:12: warning: 57 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_SENS', 'MAX_GYRO_SENS'... [-Wswitch] /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:779:12: warning: 57 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_SENS', 'MAX_GYRO_SENS'... [-Wswitch] /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:779:12: warning: 57 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_SENS', 'MAX_GYRO_SENS'... [-Wswitch] /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:779:12: warning: 57 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_SENS', 'MAX_GYRO_SENS'... [-Wswitch] /home/linus/JoyShockMapper/JoyShockMapper/src/main.cpp:779:12: warning: 57 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_SENS', 'MAX_GYRO_SENS'... [-Wswitch] 17 warnings and 5 errors generated. gmake[2]: [JoyShockMapper/CMakeFiles/JoyShockMapper.dir/build.make:82: JoyShockMapper/CMakeFiles/JoyShockMapper.dir/src/main.cpp.o] Error 1 gmake[1]: [CMakeFiles/Makefile2:172: JoyShockMapper/CMakeFiles/JoyShockMapper.dir/all] Error 2 gmake: *** [Makefile:149: all] Error 2

what went wrong

Electronicks commented 3 years ago

Duplicate of #92