4414| 6
|
[技术解答] 【求助】【HUSKYLENS】Arduino库编译出错 |
如题,从GitHub上下载的HUSKYLENS的Arduino库 已经按照Wiki里的要求放在libraries文件夹下,如下图 在使用ESP32环境编译时报错。具体报错信息如下 In file included from C:\Users\13681\Documents\Arduino\libraries\HUSKYLENS\examples\HUSKYLENS_GET_STARED\HUSKYLENS_GET_STARED.ino:22:0: C:\Users\13681\Documents\Arduino\libraries\HUSKYLENS/HUSKYLENS.h: In member function 'bool HUSKYLENS::processReturn()': C:\Users\13681\Documents\Arduino\libraries\HUSKYLENS/HUSKYLENS.h:171:90: error: no matching function for call to 'max(int16_t&, int)' protocolPtr = (Protocol_t*) realloc(protocolPtr, max(protocolInfo.protocolSize, 1) * sizeof(Protocol_t)); ^ In file included from c:\users\13681\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\algorithm:62:0, from C:\Users\13681\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32/Arduino.h:142, from C:\Users\13681\AppData\Local\Temp\arduino_build_540747\sketch\HUSKYLENS_GET_STARED.ino.cpp:1: c:\users\13681\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\bits\stl_algo.h:3463:5: note: candidate: template<class _Tp, class _Compare> _Tp std::max(std::initializer_list<_Tp>, _Compare) max(initializer_list<_Tp> __l, _Compare __comp) ^ c:\users\13681\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\bits\stl_algo.h:3463:5: note: template argument deduction/substitution failed: In file included from C:\Users\13681\Documents\Arduino\libraries\HUSKYLENS\examples\HUSKYLENS_GET_STARED\HUSKYLENS_GET_STARED.ino:22:0: C:\Users\13681\Documents\Arduino\libraries\HUSKYLENS/HUSKYLENS.h:171:90: note: mismatched types 'std::initializer_list<_Tp>' and 'short int' protocolPtr = (Protocol_t*) realloc(protocolPtr, max(protocolInfo.protocolSize, 1) * sizeof(Protocol_t)); ^ In file included from c:\users\13681\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\algorithm:62:0, from C:\Users\13681\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32/Arduino.h:142, from C:\Users\13681\AppData\Local\Temp\arduino_build_540747\sketch\HUSKYLENS_GET_STARED.ino.cpp:1: c:\users\13681\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\bits\stl_algo.h:3457:5: note: candidate: template<class _Tp> _Tp std::max(std::initializer_list<_Tp>) max(initializer_list<_Tp> __l) ^ c:\users\13681\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\bits\stl_algo.h:3457:5: note: template argument deduction/substitution failed: In file included from C:\Users\13681\Documents\Arduino\libraries\HUSKYLENS\examples\HUSKYLENS_GET_STARED\HUSKYLENS_GET_STARED.ino:22:0: C:\Users\13681\Documents\Arduino\libraries\HUSKYLENS/HUSKYLENS.h:171:90: note: mismatched types 'std::initializer_list<_Tp>' and 'short int' protocolPtr = (Protocol_t*) realloc(protocolPtr, max(protocolInfo.protocolSize, 1) * sizeof(Protocol_t)); ^ In file included from c:\users\13681\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\algorithm:61:0, from C:\Users\13681\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32/Arduino.h:142, from C:\Users\13681\AppData\Local\Temp\arduino_build_540747\sketch\HUSKYLENS_GET_STARED.ino.cpp:1: c:\users\13681\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\bits\stl_algobase.h:265:5: note: candidate: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare) max(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ c:\users\13681\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\bits\stl_algobase.h:265:5: note: template argument deduction/substitution failed: In file included from C:\Users\13681\Documents\Arduino\libraries\HUSKYLENS\examples\HUSKYLENS_GET_STARED\HUSKYLENS_GET_STARED.ino:22:0: C:\Users\13681\Documents\Arduino\libraries\HUSKYLENS/HUSKYLENS.h:171:90: note: deduced conflicting types for parameter 'const _Tp' ('short int' and 'int') protocolPtr = (Protocol_t*) realloc(protocolPtr, max(protocolInfo.protocolSize, 1) * sizeof(Protocol_t)); ^ In file included from c:\users\13681\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\algorithm:61:0, from C:\Users\13681\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32/Arduino.h:142, from C:\Users\13681\AppData\Local\Temp\arduino_build_540747\sketch\HUSKYLENS_GET_STARED.ino.cpp:1: c:\users\13681\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\bits\stl_algobase.h:219:5: note: candidate: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&) max(const _Tp& __a, const _Tp& __b) ^ c:\users\13681\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\bits\stl_algobase.h:219:5: note: template argument deduction/substitution failed: In file included from C:\Users\13681\Documents\Arduino\libraries\HUSKYLENS\examples\HUSKYLENS_GET_STARED\HUSKYLENS_GET_STARED.ino:22:0: C:\Users\13681\Documents\Arduino\libraries\HUSKYLENS/HUSKYLENS.h:171:90: note: deduced conflicting types for parameter 'const _Tp' ('short int' and 'int') protocolPtr = (Protocol_t*) realloc(protocolPtr, max(protocolInfo.protocolSize, 1) * sizeof(Protocol_t)); ^ C:\Users\13681\Documents\Arduino\libraries\HUSKYLENS/HUSKYLENS.h: In member function 'int HUSKYLENS::available()': C:\Users\13681\Documents\Arduino\libraries\HUSKYLENS/HUSKYLENS.h:297:48: error: no matching function for call to 'min(int16_t&, int&)' currentIndex = min(currentIndex, result); ^ In file included from c:\users\13681\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\algorithm:62:0, from C:\Users\13681\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32/Arduino.h:142, from C:\Users\13681\AppData\Local\Temp\arduino_build_540747\sketch\HUSKYLENS_GET_STARED.ino.cpp:1: c:\users\13681\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\bits\stl_algo.h:3451:5: note: candidate: template<class _Tp, class _Compare> _Tp std::min(std::initializer_list<_Tp>, _Compare) min(initializer_list<_Tp> __l, _Compare __comp) ^ c:\users\13681\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\bits\stl_algo.h:3451:5: note: template argument deduction/substitution failed: In file included from C:\Users\13681\Documents\Arduino\libraries\HUSKYLENS\examples\HUSKYLENS_GET_STARED\HUSKYLENS_GET_STARED.ino:22:0: C:\Users\13681\Documents\Arduino\libraries\HUSKYLENS/HUSKYLENS.h:297:48: note: mismatched types 'std::initializer_list<_Tp>' and 'short int' currentIndex = min(currentIndex, result); ^ In file included from c:\users\13681\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\algorithm:62:0, from C:\Users\13681\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32/Arduino.h:142, from C:\Users\13681\AppData\Local\Temp\arduino_build_540747\sketch\HUSKYLENS_GET_STARED.ino.cpp:1: c:\users\13681\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\bits\stl_algo.h:3445:5: note: candidate: template<class _Tp> _Tp std::min(std::initializer_list<_Tp>) min(initializer_list<_Tp> __l) ^ c:\users\13681\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\bits\stl_algo.h:3445:5: note: template argument deduction/substitution failed: In file included from C:\Users\13681\Documents\Arduino\libraries\HUSKYLENS\examples\HUSKYLENS_GET_STARED\HUSKYLENS_GET_STARED.ino:22:0: C:\Users\13681\Documents\Arduino\libraries\HUSKYLENS/HUSKYLENS.h:297:48: note: mismatched types 'std::initializer_list<_Tp>' and 'short int' currentIndex = min(currentIndex, result); ^ In file included from c:\users\13681\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\algorithm:61:0, from C:\Users\13681\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32/Arduino.h:142, from C:\Users\13681\AppData\Local\Temp\arduino_build_540747\sketch\HUSKYLENS_GET_STARED.ino.cpp:1: c:\users\13681\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\bits\stl_algobase.h:243:5: note: candidate: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ c:\users\13681\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\bits\stl_algobase.h:243:5: note: template argument deduction/substitution failed: In file included from C:\Users\13681\Documents\Arduino\libraries\HUSKYLENS\examples\HUSKYLENS_GET_STARED\HUSKYLENS_GET_STARED.ino:22:0: C:\Users\13681\Documents\Arduino\libraries\HUSKYLENS/HUSKYLENS.h:297:48: note: deduced conflicting types for parameter 'const _Tp' ('short int' and 'int') currentIndex = min(currentIndex, result); ^ In file included from c:\users\13681\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\algorithm:61:0, from C:\Users\13681\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32/Arduino.h:142, from C:\Users\13681\AppData\Local\Temp\arduino_build_540747\sketch\HUSKYLENS_GET_STARED.ino.cpp:1: c:\users\13681\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\bits\stl_algobase.h:195:5: note: candidate: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^ c:\users\13681\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\bits\stl_algobase.h:195:5: note: template argument deduction/substitution failed: In file included from C:\Users\13681\Documents\Arduino\libraries\HUSKYLENS\examples\HUSKYLENS_GET_STARED\HUSKYLENS_GET_STARED.ino:22:0: C:\Users\13681\Documents\Arduino\libraries\HUSKYLENS/HUSKYLENS.h:297:48: note: deduced conflicting types for parameter 'const _Tp' ('short int' and 'int') currentIndex = min(currentIndex, result); ^ 使用库 HUSKYLENS 在文件夹: C:\Users\13681\Documents\Arduino\libraries\HUSKYLENS (legacy) 使用 1.0.1 版本的库 Wire 在文件夹: C:\Users\13681\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\Wire 使用 6.8.0 版本的库 EspSoftwareSerial 在文件夹: C:\Users\13681\Documents\Arduino\libraries\EspSoftwareSerial exit status 1 为开发板 ESP32 Dev Module 编译时出错。 求解决方案 |
© 2013-2024 Comsenz Inc. Powered by Discuz! X3.4 Licensed