Problem for sync virtual pins using BLYNK_CONNECTED function

Hello,

I’m trying use the function BLYNK_CONNECT to synchroniza my virtual pins in system initialization, but this error appers for me.

error: redefinition of 'void BlynkOnConnected()'
error: 'void BlynkOnConnected()' previously defined here
note: in expansion of macro 'BLYNK_CONNECTED'

my code is:

BLYNK_CONNECTED(){
Blynk.syncAll();
}

I’m using Arduino MRK1000.
Somebody have a suggestion to solve this problem?

It’s really difficult to provide any advice or insight based on the small amount of info that you’ve provided.
When you create a new “Need help…” or “Issues & Errors” topic then you’re asked to provide this sort of information:

Add details :
• Hardware model + communication type. For example: Arduino UNO with Ethernet Shield
• Smartphone OS (iOS or Android) + version
• Blynk server or local server
• Blynk Library version
• Add your sketch code.

As this is a compiler error then just showing a couple of lines of code isn’t really enough. The error could be caused by a missing or mis-placed curly bracket in another part of your code or using (as the error message implies) the BLYNK_CONNECTED() command more than once in your code.

Can you add more details, and your full code please?

Pete.