I’m having problems using Blynk’s library.
#include “blynk/blynk.h”
when ever I try loading it I get numerous errors.
Any idea what might be going on?
Thanks,
Robert
I’m having problems using Blynk’s library.
#include “blynk/blynk.h”
when ever I try loading it I get numerous errors.
Any idea what might be going on?
Thanks,
Robert
Yes I load the Blynk Libraries but I’m not sure where to find the “01_PARTICLE.INO” example. I did fined it on Github and copied it but I’m still getting errors when I try verifying.
I get this:
In file included from blynk/BlynkSparkCore.h:17:0,
from blynk/BlynkSimpleSparkCore.h:14,
from blynk/blynk.h:2,
from test.cpp:21:
blynk/BlynkProtocol.h: In member function ‘bool BlynkProtocol::readHeader(BlynkHeader&)’:
This looks like an error in blynk library. Would you like to create an issue on GitHub to let the author know?
CREATE ISSUE
blynk/BlynkProtocol.h:215:34: error: there are no arguments to ‘ntohs’ that depend on a template parameter, so a declaration of ‘ntohs’ must be available [-fpermissive]
hdr.msg_id = ntohs(hdr.msg_id);
^
blynk/BlynkProtocol.h:215:34: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
This looks like an error in blynk library. Would you like to create an issue on GitHub to let the author know?
CREATE ISSUE
blynk/BlynkProtocol.h:216:34: error: there are no arguments to ‘ntohs’ that depend on a template parameter, so a declaration of ‘ntohs’ must be available [-fpermissive]
hdr.length = ntohs(hdr.length);
^
In file included from blynk/BlynkSparkCore.h:17:0,
from blynk/BlynkSimpleSparkCore.h:14,
from blynk/blynk.h:2,
from test.cpp:21:
blynk/BlynkProtocol.h: In member function ‘void BlynkProtocol::sendCmd(uint8_t, uint16_t, const void*, size_t, const void*, size_t)’:
This looks like an error in blynk library. Would you like to create an issue on GitHub to let the author know?
CREATE ISSUE
blynk/BlynkProtocol.h:244:26: error: there are no arguments to ‘htons’ that depend on a template parameter, so a declaration of ‘htons’ must be available [-fpermissive]
hdr.msg_id = htons(id);
^
This looks like an error in blynk library. Would you like to create an issue on GitHub to let the author know?
CREATE ISSUE
blynk/BlynkProtocol.h:245:38: error: there are no arguments to ‘htons’ that depend on a template parameter, so a declaration of ‘htons’ must be available [-fpermissive]
hdr.length = htons(length+length2);
^
test.cpp: In function ‘void BlynkWidgetWriteV1(BlynkReq&, const BlynkParam&)’:
test.cpp:51:15: error: ‘class BlynkSparkCore’ has no member named ‘notify’
// We allow 1 tweet per minute for now.
^
test.cpp: In function ‘void loop()’:
test.cpp:73:15: error: ‘class BlynkSparkCore’ has no member named ‘notify’
}
^
In file included from blynk/BlynkSparkCore.h:17:0,
from blynk/BlynkSimpleSparkCore.h:14,
from blynk/blynk.h:2,
from test.cpp:21:
blynk/BlynkProtocol.h: In instantiation of ‘BlynkProtocol::BlynkProtocol(Transp&) [with Transp = BlynkTransportSparkCore]’:
blynk/BlynkSparkCore.h:75:22: required from here
blynk/BlynkProtocol.h:61:14: warning: ‘BlynkProtocol::currentMsgId’ will be initialized after [-Wreorder]
uint16_t currentMsgId;
^
blynk/BlynkProtocol.h:59:14: warning: ‘uint32_t BlynkProtocol::deltaCmd’ [-Wreorder]
uint32_t deltaCmd;
^
blynk/BlynkProtocol.h:25:5: warning: when initialized here [-Wreorder]
BlynkProtocol(Transp& transp)
^
In file included from blynk/BlynkSparkCore.h:17:0,
from blynk/BlynkSimpleSparkCore.h:14,
from blynk/blynk.h:2,
from test.cpp:21:
blynk/BlynkProtocol.h: In instantiation of ‘void BlynkProtocol::sendCmd(uint8_t, uint16_t, const void*, size_t, const void*, size_t) [with Transp = BlynkTransportSparkCore; uint8_t = unsigned char; uint16_t = short unsigned int; size_t = unsigned int]’:
blynk/WidgetBridge.h:30:76: required from here
This looks like an error in blynk library. Would you like to create an issue on GitHub to let the author know?
CREATE ISSUE
blynk/BlynkProtocol.h:244:26: error: ‘htons’ was not declared in this scope
hdr.msg_id = htons(id);
^
This looks like an error in blynk library. Would you like to create an issue on GitHub to let the author know?
CREATE ISSUE
blynk/BlynkProtocol.h:245:38: error: ‘htons’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
hdr.length = htons(length+length2);
^
blynk/BlynkProtocol.h:244:26: note: ‘htons’ declared here, later in the translation unit
hdr.msg_id = htons(id);
^
In file included from blynk/BlynkSparkCore.h:17:0,
from blynk/BlynkSimpleSparkCore.h:14,
from blynk/blynk.h:2,
from test.cpp:21:
blynk/BlynkProtocol.h: In instantiation of ‘bool BlynkProtocol::readHeader(BlynkHeader&) [with Transp = BlynkTransportSparkCore]’:
blynk/BlynkProtocol.h:81:24: required from ‘bool BlynkProtocol::connect() [with Transp = BlynkTransportSparkCore]’
blynk/BlynkProtocol.h:122:22: required from ‘void BlynkProtocol::run() [with Transp = BlynkTransportSparkCore]’
test.cpp:70:15: required from here
This looks like an error in blynk library. Would you like to create an issue on GitHub to let the author know?
CREATE ISSUE
blynk/BlynkProtocol.h:215:34: error: ‘ntohs’ was not declared in this scope
hdr.msg_id = ntohs(hdr.msg_id);
^
This looks like an error in blynk library. Would you like to create an issue on GitHub to let the author know?
CREATE ISSUE
blynk/BlynkProtocol.h:216:34: error: ‘ntohs’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
hdr.length = ntohs(hdr.length);
^
blynk/BlynkProtocol.h:215:34: note: ‘ntohs’ declared here, later in the translation unit
hdr.msg_id = ntohs(hdr.msg_id);
^
In file included from blynk/BlynkSparkCore.h:16:0,
from blynk/BlynkSimpleSparkCore.h:14,
from blynk/blynk.h:2,
from test.cpp:21:
blynk/BlynkApiSparkCore.h: At global scope:
blynk/BlynkApiSparkCore.h:28:6: warning: always_inline function might not be inlinable [-Wattributes]
void BlynkApi::processCmd(const void* buff, size_t len)
^
In file included from blynk/BlynkSparkCore.h:17:0,
from blynk/BlynkSimpleSparkCore.h:14,
from blynk/blynk.h:2,
from test.cpp:21:
blynk/BlynkProtocol.h:159:6: warning: always_inline function might not be inlinable [-Wattributes]
void BlynkProtocol::processInput(void)
^
make[1]: *** […/build/target/user/platform-6test.o] Error 1
make: *** [user] Error 2
Error: Could not compile. Please review your code.
Please get sure you’re using latest Blynk library (v0.3.3 or later).
You can actually select it in the Web IDE, but i’s not very obvious:
Go to libraries -> Blynk -> (i) Show more info and pick latest.
Probably you’ll have to re-add library to your sketch (also via UI).