【求助】【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 编译时出错。
求解决方案
用mind+里面的库试试 Forgotten 发表于 2020-3-20 08:58
用mind+里面的库试试
啊好了~谢谢!!! FishGan 发表于 2020-3-20 11:25
啊好了~谢谢!!!
知不知道是什么原因呀?分享下呗,方便大家遇到类似情况时,能参考参考嘛{:5_190:} Youyou 发表于 2020-3-20 17:35
知不知道是什么原因呀?分享下呗,方便大家遇到类似情况时,能参考参考嘛 ...
github上的库和Mind+里面的库并不完全一样。
github上的那个库,在普通Arduino板卡下可以编译通过,在ESP32下就会报错
而Mind+的库里有预编译条件,兼容了ESP32平台 FishGan 发表于 2020-3-20 20:33
github上的库和Mind+里面的库并不完全一样。
github上的那个库,在普通Arduino板卡下可以编译通过,在ESP ...
请问, 预编译条件是哪一个呢?
没有找到 ,将该文件夹放到arduino的库中,还是报错,C:\Mixly_WIN\arduino\portable\sketchbook\libraries\SoftwareSerial\src\SoftwareSerial.cpp:41:27: fatal error: avr/interrupt.h: No such file or directory求帮助,谢谢!
页:
[1]