Variable or field 'BlynkWidgetWrite100' declared void

@Gunner the compiler is wrong there is nothing wrong with the last line of code.

That’s my point… the compiler often doesn’t indicate the actual issue… and it could be almost anything, including that the compiler is simply mistaken.

I have proven that ADC command compiles and works within a current Blynk script, so the question becomes, what is the other conditions that can cause the compile error… line position, empty loops or functions, unkind words toward the PC…

1 Like

I believe it relates to the position of the ADC_MODE() on this occasion.

I concure…

Naughty and complex :stuck_out_tongue:

4 Likes

indeed, if i put the ADC_MODE(ADC_VCC); right after the includes, it compiles.
thanks @Gunner!

however, the official docs are antinomic, regarding this.

here it says:
ADC_MODE(ADC_VCC);
This line has to appear outside of any functions, for instance right after the #include lines of your sketch.

but here says:
Add the following line to the top of your sketch

well, for me, top of the sketch != right after the include lines

i hope it will work ok this way! thanks again everybody for the advices!

1 Like

7 posts were split to a new topic: Compiling on a Mega using BlynkSimpleEthernet2

probably just a conflict of priorities with the Blynk Libraries preferring some code first and the Core doing the same… code egos… the start of the robot uprising :robot:

1 Like

All this is really weird. For example, BLYNK_PRINT macro goes before Blynk*.h, and still works fine…

after all, i rather think the problem is on the esp core side, not the blynk library side.

they already had such compilation problems several years ago with this macro. i thought to open a topic on the esp core git, i’m courious what they will say?

maybe will do that this weekend…

1 Like

@wanek the problem is that it’s any macro that comes before the Blynk libraries so more likely a Blynk issue than an ESP core issue.

@Costas how comes is it any macro? BLYNK_PRINT works somehow… ?

@vshymanskyy see test code at Macro_fail: compile error on Zero (and probably other platforms)

well, i’m not an expert in this. currently i’m happy that it compiles and i can use the code. on the long term, still, probably a better solution is needed.

on my side i consider this case as solved. if i can help you with anything else to debug this issue, please let me know!

1 Like

For anyone searching on this. I updated from arduino v1.8.8 to 1.8.10 and my compiling error below was fixed.

variable or field ‘BlynkWidgetWriteInternalPinACON’ declared void

1 Like