Skip to content

Fix Compilation Errors#1

Merged
AryanGHM merged 1 commit intomasterfrom
AryanGHM-patch-1
Jun 24, 2020
Merged

Fix Compilation Errors#1
AryanGHM merged 1 commit intomasterfrom
AryanGHM-patch-1

Conversation

@AryanGHM
Copy link
Copy Markdown
Owner

Error text:
Compiling debug version of 'ServerGuardianSNMP_Stage1' for 'LOLIN(WEMOS) D1 R2 & mini'

ArduinoSNMP.cpp:21: In file included from
ArduinoSNMP.h: In member function void SNMP_PDU::prepare_trapv2(SNMP_VALUE*)

ArduinoSNMP.h: 970:51: error: call of overloaded 'encode(SNMP_SYNTAXES, long unsigned int)' is ambiguous
t_v->encode(SNMP_SYNTAX_TIME_TICKS, millis() \ 10)

Compiling on esp8266 Core version 2.4.2 using Visual Studio and vMicro based on Arduino IDE version 1.4/1.6.
The errors were because of the millis() function, as it seems like compiler can't detect the type of the millis(), although it detects the reference. So the compiler detects multiple candidates and causes the preceding error. There is also a similar one in ArduinoSNMP.cpp.

Error text:
Compiling debug version of 'ServerGuardianSNMP_Stage1' for 'LOLIN(WEMOS) D1 R2 & mini'
 
ArduinoSNMP.cpp:21: In file included from
ArduinoSNMP.h: In member function void SNMP_PDU::prepare_trapv2(SNMP_VALUE*)
 
ArduinoSNMP.h: 970:51: error: call of overloaded 'encode(SNMP_SYNTAXES, long unsigned int)' is ambiguous
   t_v->encode(SNMP_SYNTAX_TIME_TICKS, millis() \ 10)

Compiling on esp8266 Core version 2.4.2 using Visual Studio and vMicro based on Arduino IDE version 1.4/1.6.
The errors were because of the millis() function, as it seems like compiler can't detect the type of the millis(), although it detects the reference. So the compiler detects multiple candidates and causes the preceding error. There is also a similar one in ArduinoSNMP.cpp.
@AryanGHM AryanGHM marked this pull request as ready for review June 24, 2020 12:05
@AryanGHM AryanGHM merged commit 308653f into master Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant