Blynk Compile Error

Hey Everyone,
Running into a very weird issue. I cannot compile any Blynk Edgent sketches (even the basic edgent example with a Template ID and Template Name put in without getting the following error: #error “Please specify your BLYNK_TEMPLATE_ID and BLYNK_TEMPLATE_NAME”
^~~~~

Now, these sketches will compile fine on my desktop, but refuse to compile on my laptop. I’ve previously successfully compiled sketches on this laptop but I’m at a loss. The only change made is that I recently updated to the newest Blynk library (1.3.0) but I have updated on both the laptop and the desktop and only the laptop has errors.

Any steps to identify the issue? I’m at a loss on first steps and any help would be appreciated.

Thanks!

Did you try deleting the blynk library folder with in the arduino folder and then reinstalling the library again?

I had faced the similar issue a while back and followed the same steps above and it solved the issue.

Yeah I tried that. I’ve deleted and reinstalled the library and I also deleted and reinstalled the entire IDE to no change.

Have you actually inserted the two lines of firmware configuration into the sketch, and ensured that these aren’t commented out?

What board are you using, and board type are you choosing when you compile?
Is this the same on moth machines?

If you’re using an ESP8266 or ESP32 based board do you have the same core files installed on both machines?

Are you getting any other compiler messages or warnings before you see this message? (If you post compiler output then remember to use triple backticks).

Pete.

It seems I was hasty in my original assumptions.

I fired up the Arduino IDE on my desktop today and it turned out I had an update available for my ESP32 boards and some other misc libraries.

After the updates completed, I can no longer compile an edgent sketch of any sort on this machine either, getting the following error (which is the same error I get on my laptop):

In file included from c:\Users\Corey.HOTCHSDC\Documents\Arduino\libraries\Blynk\src/BlynkApiArduino.h:14,
                 from c:\Users\Corey.HOTCHSDC\Documents\Arduino\libraries\Blynk\src/BlynkSimpleEsp32_SSL.h:21,
                 from C:\Users\Corey.HOTCHSDC\Documents\Arduino\ESP32_Edgent_ZoneCommandRev2\BlynkEdgent.h:8,
                 from C:\Users\Corey.HOTCHSDC\Documents\Arduino\ESP32_Edgent_ZoneCommandRev2\ESP32_Edgent_ZoneCommandRev2.ino:16:
c:\Users\Corey.HOTCHSDC\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkApi.h:39:6: error: #error "Please specify your BLYNK_TEMPLATE_ID and BLYNK_TEMPLATE_NAME"
     #error "Please specify your BLYNK_TEMPLATE_ID and BLYNK_TEMPLATE_NAME"
      ^~~~~

exit status 1

Compilation error: exit status 1

I DO have a BLYNK_TEMPLATE_ID and BLYNK_TEMPLATE_NAME specified in the sketch and the error is the same from a fresh Edgent example sketch with those inputted to a previously working sketch that now will no longer compile.

I’m going to mess around and see if going to an older Blynk library version helps. I’m not sure how to install an older version of the ESP32 board configuration file but I’ll see if I can’t try that as well.

As for your other question:
ESP32 Dev Module is my selected board.

Sorry, that was quicker than expected.
If I step the Blynk library back to 1.2.0 the sketch compiles as expected.

Is your Blynk firmware configuration data at the top of your sketch?

Pete.

By that you mean the BLYNK_TEMPLATE_ID and BLYNK_TEMPLATE_NAME ?

If so, yes.

I’m using a custom PCB so I use the custom board setting and define my reset pins and status LED pin in the settings.h

So I just uninstalled and reinstalled the newest Blynk library to confirm the issue.

With 1.3.0 the I cannot get either the example Edgent sketch (with BLYNK_TEMPLATE_ID and BLYNK_TEMPLATE_NAME filled in) nor my previously successfully compiling Edgent based sketch to compile without getting the error mentioned in my first post.

Both sketches however compile fine if I switch back to 1.2.0, the issue does appear to lie in using the newest version of the Blynk library.

Which IDE are you using?

Pete.

Hey Pete,

Using the Arduino IDE 2.1.1

I just did the following…

  • Fired-up Arduino IDE V2.1.1
  • Confirmed that I had Blynk C++ library version 1.3.0 installed
  • Checked that my ESP32 core is up to date (2.0.11 by Espressif Systems)
  • Opened the Blynk Edgent ESP32 example from File > Examples > Blynk > Edgent
  • Copied the two lines of Firmware Configuration code from an existing template
  • Pasted these two lines over the existing Blynk_Template _ID and _Name (lines 24 & 25)
  • Selected ESP32 Dev Module as my board tupe in the IDE
  • Hit the Verify button

The code compiles fine (with a warning that “Custom board configuration is use” and “Invalid LED configuration” in Indicator.h)

I also did the same thing in v1.8.19 of the IDE (which is what I normally use) and that works fine too.

Pete.

Hey Pete,

Thanks for checking.
I have the following:
Arduino IDE 2.1.1
ESP 2.0.11 by Espressif
Blynk 1.3.0

And I get the following error, no compiler warnings:

In file included from c:\Users\Corey.HOTCHSDC\Documents\Arduino\libraries\Blynk\src/BlynkApiArduino.h:14,
                 from c:\Users\Corey.HOTCHSDC\Documents\Arduino\libraries\Blynk\src/BlynkSimpleEsp32_SSL.h:21,
                 from C:\Users\Corey.HOTCHSDC\Documents\Arduino\Edgent_ESP32_ZoneCommandRev3\BlynkEdgent.h:8,
                 from C:\Users\Corey.HOTCHSDC\Documents\Arduino\Edgent_ESP32_ZoneCommandRev3\Edgent_ESP32_ZoneCommandRev3.ino:16:
c:\Users\Corey.HOTCHSDC\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkApi.h:39:6: error: #error "Please specify your BLYNK_TEMPLATE_ID and BLYNK_TEMPLATE_NAME"
     #error "Please specify your BLYNK_TEMPLATE_ID and BLYNK_TEMPLATE_NAME"
      ^~~~~

exit status 1

Compilation error: exit status 1

If I “downgrade” to Blynk 1.2.0 the same sketch compiles fine.

Are you sure that your sketch actually defines BLYNK_TEMPLATE_NAME and not BLYNK_DEVICE_NAME which was the old name for this identifier?

Pete.

Oh my Pete, now I feel really dumb.

I stared at those so many times confirming they were “correct” and somehow missed that. Combined with copy-pasting my template names and ID’s from my previous sketches… that was the issue.

You can mark this solved and I’ll go and wash the egg off my face.

Thank you!

I thought it was something simple like that, which is why I talked about copy/pasting those two lines of firmware configuration directly from the web console into your sketch.

Glad it’s solved!

Pete.

1 Like

In file included from c:\Users\ASUS\Documents\Arduino\libraries\Blynk\src/Blynk.h:14,
from C:\Users\ASUS\Desktop\sketch_PROJE\sketch_PROJE.ino:1:
c:\Users\ASUS\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkApi.h:39:6: error: #error “Please specify your BLYNK_TEMPLATE_ID and BLYNK_TEMPLATE_NAME”
39 | #error “Please specify your BLYNK_TEMPLATE_ID and BLYNK_TEMPLATE_NAME”
| ^~~~~
exit status 1

Compilation error: exit status 1

I get such a warning.
ESP 8266 Module is my selected board
Blynk library 1.3.2
Arduıno IDE 2.3.3
I would be grateful if you could help me, my project has been interrupted.

@SUVARI click this link…

Pete.

I did the steps you specified, but the problem was not solved. The code is like this. Can you specify where the error is in the code?

[Unformatted code removed by moderator]

You did not what Pete has asked you to do, details are important.

  • first of all format your code for display in this forum by adding ``` on separate lines before and after your code.
  • then you should realise “ is not the same as " (even if it might look similar).
  • in addition you have commented out the #defines.
  • then read the Blynk doc and organise your code to comply with the runtime model of Blynk if you want it to run stable.

Good luck,

Piet.