[SOLVED] Rebuilding Arduino IDE --- (Incorrect auto-inserted library)

So my libraries had become a nightmare. I tried to straighten it out but that was enough.

I backed up my valuable Libraries and Sketches (so much as they were) to a drive and set to rebuild my IDE.

I cleared my directory of any signs of Arduino IDE, Sketches or Library Files.

I reloaded IDE first, then downloaded Blynk 0.4.6 from Blynk (and Github).

I installed them and the IDE see’s them. I built a basic sketch using #include Blynk.h and Blynk.run(); but I get errors! How can this be? It’s the most basic of first steps. I’ve been a Blynker for over a year now. I’m no @Dmitriy but I’m learning and I thought I understood the basics.

I can’t figure out why I get “‘Blynk’ was not declared in this scope” from this:

Using library Blynk at version 0.4.6 in folder: /Users/#####/Documents/Arduino/Sketches/libraries/Blynk
exit status 1
‘Blynk’ was not declared in this scope

#include "Blynk.h"

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:
  Blynk.run();
}

My directory tree looks like this:

I’ve gone back and reviewed “Getting Started” and Arduino’s Library Guide.

I thought it was my Mac so I turned it off, came back, same thing.

Any ideas? Sorry this is such a base Newbie question and not some indepth code array problem!

Cheers

lane0138

guess what, it throws the exact same error for me too!!! this could be a really serious issue then!!! :slight_smile:

ok, just kidding. what is this for?

i mean, this is nonsense.

Yeah, well… just start with some provided examples. They are categorized and as simple as they can be. Nowhere you will find “Blynk.h”, instead you gonna find a define referring to used connection and board type…

When you open a new project and go to the Blynk Library that’s what “IT” throws in there. #include Blynk.h

I didn’t put it there. I just wanted to get Blynk, Blynk.begin and Blynk.run working so I put the “Blynk” .0.4.6 Library install in and clicked on the Library in the drop down.

What did I do wrong??? What Blynk Library am I supposed to use. I followed the “Getting Started” link and loaded up the 0.4.6 ver.

Signed

Totally Lost !

I finally remembered how you got that (for others reading - in IDE create NEW, then under Sketch, choose Include Library and choose Blynk)

But my question is why? If you, as you started, have been using Blynk for over a year now, why suddenly even try, and thus become confused by, this “new” method?

I meen, I understand the process of the IDE’s clickable Add Libraries (and I suspect that is is really grabbing the folder title and slapping an .h on it if it cannot find an *.h file within)… however with Blynk, there are multiple library options embedded in multiple folders, and the actual Blynk libraries you need are going to depend on the hardware and communications type… as generally seen and perhaps made note of when using the included examples.

I have been using Arduino IDE for years and never bothered with the click and add option… almost takes longer to find the library as it does to type it :wink:

Umm…

This must be a form of “tough-love”.:worried:

@Gunner
But my question is why? If you, as you started, have been using Blynk for over a year now, why suddenly even try, and thus become confused by, this “new” method?

Why? Here’s the cold hard truth. Because, I thought for the last year, I was supposed too! I’ve put that in every sketch I’ve written. Very first line. Another truth. I thought the only way to get the libraries in a sketch was to click and add.

I’m sure I’m the only semi-newbie not to understand everything about Blynk, Arduino IDE and C++.

Clearly I have more to learn and research to do. I certainly don’t mean to take up time needlessly with low level fodder. I’ll follow up with @Pavel documents, tutorials and detailed instructions on Blynk that he referred to back in 2015. Some of us aren’t Java Coders or C+ or EEE Engineers, some of us do it to relax, because we enjoy it. These pages are the only source to learn about interacting with Blynk.

Cheers

Standard forum practice… we are all fellow makers, volunteering here, and got to any perceived level of knowledge by being told the same thing by yet others… “Maker, think thyself” :smiley:

You be “preachin to the choir” on that one :wink:

Good points… I’m not sure I understand how to fix my “nonsense” misunderstood problem, but I get your point. Thanks for taking a few minutes to nudge me in the right direction.

Maybe “Macrame” …

Well, it should be an easy fix now… don’t use that “library” any more. Make and save your own template that includes the basics as required by your hardware. For my Arduinos I had two, one for USB-Link and one for my Ethernet adapter (which has since sadly passed away).

hey, @Lane0138, it was definitely no offense from my side with that :wink: i just could not imagine how did you came up with that header file.

when i begin a new blynk project, i just go to file > examples > blynk and pick the right board / communication combo from there. then it is everything prepared for the new sketch.