Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Compilation errors with Blynk Library (Read 1071 times)
Kabron
Full Member
***
Offline


Posts: 170
Joined: Nov 1st, 2015
Compilation errors with Blynk Library
Jan 26th, 2021 at 2:48pm
Print Post  
Two years ago sketch compiled successfully. 
Now, with old and new Blynk libraries I got errors.
Arduino IDE compiles OK.
« Last Edit: Jan 26th, 2021 at 2:50pm by Kabron »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2175
Joined: Feb 13th, 2019
Re: Compilation errors with Blynk Library
Reply #1 - Jan 26th, 2021 at 4:26pm
Print Post  
Thanks for the report.

Would it be possible to email the project to us, or attach here, so we can reproduce more easily?

We will investigate similar errors in our basic Blynk project as well to ensure this is resolved.
« Last Edit: Jan 26th, 2021 at 4:38pm by Simon@Visual Micro »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2175
Joined: Feb 13th, 2019
Re: Compilation errors with Blynk Library
Reply #2 - Jan 26th, 2021 at 5:35pm
Print Post  
If in your sketch, do you have a layout similar to below:
Code
Select All
//************************** Includes  ****************************
#include "FlashIR.h"
#include "CheckForUpdates.h"
//**************************  Blynk Includes  ****************************
//#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
//**************************  OTA Initialization  ****************************
int FW_VERSION = 3005; //OTA version with classes on local server

#include <ESP8266WiFi.h>
#define BLYNK_TIMEOUT_MS  750  // must be BEFORE BlynkSimpleEsp8266.h doesn't work !!!
#define BLYNK_HEARTBEAT   17   // must be BEFORE BlynkSimpleEsp8266.h works OK as 17s
#include <BlynkSimpleEsp8266.h>
//**************************  Blynk Initialization  ****************************
 



Then adding a dummy function beneath the "#include <BlynkSimpleEsp8266.h>" ensures the prototypes are injected at the correct point in the sketch.
Code
Select All
void putPrototypesHere(){} 



The change in result between the versions is due to how Visual Micro now generates the function prototypes and in this case it is adding them to the CPP too early, which the addition above avoids.
  
Back to top
 
IP Logged
 
Kabron
Full Member
***
Offline


Posts: 170
Joined: Nov 1st, 2015
Re: Compilation errors with Blynk Library
Reply #3 - Jan 27th, 2021 at 5:06am
Print Post  
Thanks a lot!
OK now.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint