Multiple libraries were found for "wire"\\\\\\\\ - arduino-esp8266

Arduino: 1.8.11 (Windows Store 1.8.28.0) (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled (new can abort), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"
C:\Users\user\Documents\Arduino\libraries\Adafruit_NFCShield_I2C-master\Adafruit_NFCShield_I2C.cpp: In function 'void wiresend(uint8_t)':
C:\Users\user\Documents\Arduino\libraries\Adafruit_NFCShield_I2C-master\Adafruit_NFCShield_I2C.cpp:53:15: error: 'Wire1' was not declared in this scope
#define WIRE Wire1
^
C:\Users\user\Documents\Arduino\libraries\Adafruit_NFCShield_I2C-master\Adafruit_NFCShield_I2C.cpp:78:5: note: in expansion of macro 'WIRE'
WIRE.write((uint8_t)x);
^
C:\Users\user\Documents\Arduino\libraries\Adafruit_NFCShield_I2C-master\Adafruit_NFCShield_I2C.cpp: In function 'uint8_t wirerecv()':
C:\Users\user\Documents\Arduino\libraries\Adafruit_NFCShield_I2C-master\Adafruit_NFCShield_I2C.cpp:53:15: error: 'Wire1' was not declared in this scope
#define WIRE Wire1
^
C:\Users\user\Documents\Arduino\libraries\Adafruit_NFCShield_I2C-master\Adafruit_NFCShield_I2C.cpp:92:12: note: in expansion of macro 'WIRE'
return WIRE.read();
^
C:\Users\user\Documents\Arduino\libraries\Adafruit_NFCShield_I2C-master\Adafruit_NFCShield_I2C.cpp: In member function 'void Adafruit_NFCShield_I2C::begin()':
C:\Users\user\Documents\Arduino\libraries\Adafruit_NFCShield_I2C-master\Adafruit_NFCShield_I2C.cpp:53:15: error: 'Wire1' was not declared in this scope
#define WIRE Wire1
^
C:\Users\user\Documents\Arduino\libraries\Adafruit_NFCShield_I2C-master\Adafruit_NFCShield_I2C.cpp:120:3: note: in expansion of macro 'WIRE'
WIRE.begin();
^
C:\Users\user\Documents\Arduino\libraries\Adafruit_NFCShield_I2C-master\Adafruit_NFCShield_I2C.cpp: In member function 'void Adafruit_NFCShield_I2C::wirereaddata(uint8_t*, uint8_t)':
C:\Users\user\Documents\Arduino\libraries\Adafruit_NFCShield_I2C-master\Adafruit_NFCShield_I2C.cpp:53:15: error: 'Wire1' was not declared in this scope
#define WIRE Wire1
^
C:\Users\user\Documents\Arduino\libraries\Adafruit_NFCShield_I2C-master\Adafruit_NFCShield_I2C.cpp:981:3: note: in expansion of macro 'WIRE'
WIRE.requestFrom((uint8_t)PN532_I2C_ADDRESS, (uint8_t)(n+2));
^
C:\Users\user\Documents\Arduino\libraries\Adafruit_NFCShield_I2C-master\Adafruit_NFCShield_I2C.cpp: In member function 'void Adafruit_NFCShield_I2C::wiresendcommand(uint8_t*, uint8_t)':
C:\Users\user\Documents\Arduino\libraries\Adafruit_NFCShield_I2C-master\Adafruit_NFCShield_I2C.cpp:53:15: error: 'Wire1' was not declared in this scope
#define WIRE Wire1
^
C:\Users\user\Documents\Arduino\libraries\Adafruit_NFCShield_I2C-master\Adafruit_NFCShield_I2C.cpp:1021:3: note: in expansion of macro 'WIRE'
WIRE.beginTransmission(PN532_I2C_ADDRESS);
^
Multiple libraries were found for "Wire.h"
Used: C:\Users\user\Documents\Arduino\libraries\Wire
Not used: C:\Users\user\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\libraries\Wire
Multiple libraries were found for "SPI.h"
Used: C:\Users\user\Documents\Arduino\libraries\SPI
Not used: C:\Users\user\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\libraries\SPI
Multiple libraries were found for "ESP8266WiFi.h"
Used: C:\Users\user\Documents\Arduino\libraries\ESP8266WiFi
Not used: C:\Users\user\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WiFi
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

You have SPI and Wire library installed in libraries folder. This libraries are platform dependent and are the correct version is bundled with the boards package for the platform.
The ESP8266WiFi library is bundled with the ESP8266 Arduino boards package. It should not be installed in libraries.
Delete the Wire, SPI library and ESP8266WiFi from C:\Users\user\Documents\Arduino\libraries\
The Arduino builder should prefer the library bundled with boards package, but the version of builder in Arduino IDE 1.8.11 has a bug and selects the wrong library.

Related

Connecting Sparkfun ESP8266 Thing to Azure IoT Hub

I am currently trying to connect my Sparkfun ESP8266 Thing to my Azure IoT Hub. I have successfully set up my hub, and am following this tutorial on how to connect the Thing to my Azure IoT Hub: https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-sparkfun-esp8266-thing-dev-get-started
Unfortunately I keep getting the error:
'StaticJsonBuffer' was not declared in this scope
Arduino: 1.8.5 (Windows 10), Board: "SparkFun ESP8266 Thing, 80 MHz, 512K (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"
Build options changed, rebuilding all
C:\Users\L.FULL\Documents\Arduino\iot-hub-SparkFun-ThingDev-client-app\app\message.ino: In function 'bool readMessage(int, char*)':
message:46: error: 'StaticJsonBuffer' was not declared in this scope
StaticJsonBuffer<MESSAGE_MAX_LEN> jsonBuffer;
^
C:\Users\L.FULL\Documents\Arduino\iot-hub-SparkFun-ThingDev-client-app\app\message.ino:46:5: note: suggested alternative:
In file included from C:\Users\L.FULL\Documents\Arduino\libraries\arduino_172002\src/ArduinoJson/StaticJsonDocument.hpp:8:0,
from C:\Users\L.FULL\Documents\Arduino\libraries\arduino_172002\src/ArduinoJson.hpp:10,
from C:\Users\L.FULL\Documents\Arduino\libraries\arduino_172002\src/ArduinoJson.h:9,
from C:\Users\L.FULL\Documents\Arduino\iot-hub-SparkFun-ThingDev-client-app\app\message.ino:2:
C:\Users\L.FULL\Documents\Arduino\libraries\arduino_172002\src/ArduinoJson/Memory/StaticJsonBuffer.hpp:110:7: note: 'ArduinoJson::Internals::StaticJsonBuffer'
class StaticJsonBuffer : public Internals::StaticJsonBufferBase {
^
message:46: error: 'jsonBuffer' was not declared in this scope
StaticJsonBuffer<MESSAGE_MAX_LEN> jsonBuffer;
^
message:74: error: 'class ArduinoJson::JsonObject' has no member named 'printTo'
root.printTo(payload, MESSAGE_MAX_LEN);
^
C:\Users\L.FULL\Documents\Arduino\iot-hub-SparkFun-ThingDev-client-app\app\message.ino: In function 'void parseTwinMessage(char*)':
message:80: error: 'StaticJsonBuffer' was not declared in this scope
StaticJsonBuffer<MESSAGE_MAX_LEN> jsonBuffer;
^
C:\Users\L.FULL\Documents\Arduino\iot-hub-SparkFun-ThingDev-client-app\app\message.ino:80:5: note: suggested alternative:
In file included from C:\Users\L.FULL\Documents\Arduino\libraries\arduino_172002\src/ArduinoJson/StaticJsonDocument.hpp:8:0,
from C:\Users\L.FULL\Documents\Arduino\libraries\arduino_172002\src/ArduinoJson.hpp:10,
from C:\Users\L.FULL\Documents\Arduino\libraries\arduino_172002\src/ArduinoJson.h:9,
from C:\Users\L.FULL\Documents\Arduino\iot-hub-SparkFun-ThingDev-client-app\app\message.ino:2:
C:\Users\L.FULL\Documents\Arduino\libraries\arduino_172002\src/ArduinoJson/Memory/StaticJsonBuffer.hpp:110:7: note: 'ArduinoJson::Internals::StaticJsonBuffer'
class StaticJsonBuffer : public Internals::StaticJsonBufferBase {
^
message:80: error: 'jsonBuffer' was not declared in this scope
StaticJsonBuffer<MESSAGE_MAX_LEN> jsonBuffer;
^
message:82: error: 'class ArduinoJson::JsonObject' has no member named 'success'
if (!root.success())
^
message:88: error: 'ArduinoJson::Internals::enable_if >::type' has no member named 'success'
if (root["desired"]["interval"].success())
^
exit status 1
'StaticJsonBuffer' was not declared in this scope
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
I have changed the DEVICE_ID from "SparkFun ESP8266 Thing Dev" to "SparkFun ESP8266 Thing", and am using simulated data.
Any help with this would be much appreciated!
The reason for this error is that you install the ArduinoJson version >= 6. Default version 6.2.3-beta will be installed but from version 6 and higher JsonBuffer is replaced with JsonDocument. It is also indicate in the error message:
C:\Users\L.FULL\Documents\Arduino\iot-hub-SparkFun-ThingDev-client-app\app\message.ino:46:5:
note: suggested alternative:
In file included from
C:\Users\L.FULL\Documents\Arduino\libraries\arduino_172002\src/ArduinoJson/StaticJsonDocument.hpp:8:0
To solve this issue you can roll back to the previous version. Version 5.13.2 works for me.
Reference issue on ArduinoJson repo and issue on iot-hub-feather-huzzah-client-app repo.

Use of static_assert forbidden in Android project

I am porting some C++ code to Android. One of the source files includes a webrtc header file that causes error during compilation. I have reduced the problem to this simple code:
template <class T, int n>
struct DefaultDeleter<T[n]> {
// Never allow someone to declare something like scoped_ptr<int[10]>.
static_assert(sizeof(T) == -1, "do not use array with size as type");
};
The error I get is:
[armeabi-v7a] Compile++ thumb: dummyclient <= dummy.cpp
dummy.cpp:7:3: warning: identifier 'static_assert' will become a keyword in C++0x [-Wc++0x-compat]
dummy.cpp:5:8: error: 'DefaultDeleter' is not a template
dummy.cpp:7:17: error: expected identifier before 'sizeof'
dummy.cpp:7:17: error: expected ',' or '...' before 'sizeof'
dummy.cpp:7:70: error: ISO C++ forbids declaration of 'static_assert' with no type [-fpermissive]
The same code compiles fine on Windows and Linux. Is there some compiler settings that are required for Android? Regards.
You need to pass the CPPFLAG -std=c++11.

UHD Device Won't Build in Redhawk 1.9.0

I am trying to build the UHD device, latest commit (c749987865c5e158b65f26b160e0435f34c71580), in Redhawk 1.9.0, but receive multiple build errors (see below). I received similar error when trying to build the most recent release of the UHD Device (v2.0.2).
The readme file with the UHD device doesn't indicate the requirements for building the device or provide any other instructions.
I have 2 questions:
1) Do I need to have GNUHawk installed too?
2) If so, I guess that means I need to downgrade to Redhawk 1.8.4, since GNUHawk supposedly won't work with Redhawk 1.9.0 (http://redhawksdr.github.io/Documentation/gnuhawk/mainli2.html), correct?
In case the problem is related to my build procedure, my steps are as follows:
1) Download zip file of repo from GitHub
2) Extract file contents into REDHAWK workspace and import project
3) Right click on project name (USRP_UHD-develop-1.8), select "Build Project"
09:30:38 **** Build of configuration Debug for project USRP_UHD-develop-1.8 ****
/home/nousain/workspace/USRP_UHD-develop-1.8/cpp/build.sh all
g++ -DPACKAGE_NAME=\"USRP_UHD\" -DPACKAGE_TARNAME=\"usrp_uhd\" -DPACKAGE_VERSION=\"2.0.1\" -DPACKAGE_STRING=\"USRP_UHD\ 2.0.1\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"usrp_uhd\" -DVERSION=\"2.0.1\" -DHAVE_OMNIORB4=1 -DHAVE_LOG4CXX=1 -DHAVE_BOOST=1 -DHAVE_BOOST_THREAD=1 -DEXPECTED_VECTOR_IMPL=/\*\*/ -Wall -D__x86_64__ -D__linux__ -D__OSVERSION__=2 -DHAVE_LOG4CXX=1 -DENABLE_EVENTS=1 -I/usr/local/redhawk/core/include -I/usr/local/redhawk/core/include/ossie -I/usr/local/redhawk/core/share/idl -pthread -I/usr/include -I/usr/local/redhawk/core/include/ossie -I/usr/local/redhawk/core/include/redhawk -g -O2 -MT USRP_UHD-USRP_UHD.o -MD -MP -MF .deps/USRP_UHD-USRP_UHD.Tpo -c -o USRP_UHD-USRP_UHD.o `test -f 'USRP_UHD.cpp' || echo './'`USRP_UHD.cpp
In file included from USRP_UHD.cpp:37:
USRP_UHD.h:26:35: error: uhd/usrp/multi_usrp.hpp: No such file or directory
In file included from /usr/include/boost/thread/future.hpp:12,
from /usr/include/boost/thread.hpp:24,
from USRP_UHD_base.h:24,
from USRP_UHD.h:25,
from USRP_UHD.cpp:37:
/usr/include/boost/exception_ptr.hpp:43: error: looser throw specifier for ‘virtual boost::exception_ptr::~exception_ptr()’
/usr/include/boost/exception/detail/exception_ptr_base.hpp:26: error: overriding ‘virtual boost::exception_detail::exception_ptr_base::~exception_ptr_base() throw ()’
In file included from USRP_UHD.cpp:37:
USRP_UHD.h:393: error: ‘uhd’ has not been declared
USRP_UHD.h:393: error: ISO C++ forbids declaration of ‘sptr’ with no type
USRP_UHD.h:393: error: expected ‘;’ before ‘usrpDevice’
USRP_UHD.h:394: error: ‘uhd’ has not been declared
USRP_UHD.h:394: error: ISO C++ forbids declaration of ‘device_addr_t’ with no type
USRP_UHD.h:394: error: expected ‘;’ before ‘device_addr’
USRP_UHD.cpp: In member function ‘virtual int USRP_UHD_i::serviceFunction()’:
USRP_UHD.cpp:281: error: ‘uhd’ has not been declared
USRP_UHD.cpp:281: error: expected ‘;’ before ‘_metadata’
USRP_UHD.cpp:282: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:282: error: ‘_metadata’ was not declared in this scope
USRP_UHD.cpp:282: error: ‘uhd’ has not been declared
USRP_UHD.cpp:282: error: ‘uhd’ has not been declared
USRP_UHD.cpp:285: error: ‘uhd’ has not been declared
USRP_UHD.cpp:287: error: ‘uhd’ has not been declared
USRP_UHD.cpp:290: error: ‘uhd’ has not been declared
USRP_UHD.cpp: In member function ‘bool USRP_UHD_i::singleService_transmit(IN_PORT_TYPE*)’:
USRP_UHD.cpp:366: error: ‘uhd’ has not been declared
USRP_UHD.cpp:366: error: expected ‘;’ before ‘_metadata’
USRP_UHD.cpp:367: error: ‘_metadata’ was not declared in this scope
USRP_UHD.cpp:372: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:372: error: ‘uhd’ has not been declared
USRP_UHD.cpp:372: error: ‘uhd’ has not been declared
USRP_UHD.cpp:376: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:376: error: ‘uhd’ has not been declared
USRP_UHD.cpp:376: error: ‘uhd’ has not been declared
USRP_UHD.cpp: In member function ‘virtual void USRP_UHD_i::configure(const CF::Properties&)’:
USRP_UHD.cpp:431: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:446: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:454: error: ‘uhd’ has not been declared
USRP_UHD.cpp:454: error: expected ‘;’ before ‘clock_config’
USRP_UHD.cpp:455: error: ‘clock_config’ was not declared in this scope
USRP_UHD.cpp:455: error: ‘uhd’ has not been declared
USRP_UHD.cpp:456: error: ‘uhd’ has not been declared
USRP_UHD.cpp:457: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:459: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:459: error: ‘uhd’ has not been declared
USRP_UHD.cpp:461: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:461: error: ‘uhd’ has not been declared
USRP_UHD.cpp: In member function ‘void USRP_UHD_i::init_usrp(std::string)’:
USRP_UHD.cpp:473: error: ‘device_addr’ was not declared in this scope
USRP_UHD.cpp:473: error: ‘uhd’ has not been declared
USRP_UHD.cpp:475: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:475: error: ‘uhd’ has not been declared
USRP_UHD.cpp:492: error: ‘uhd’ has not been declared
USRP_UHD.cpp: In member function ‘bool USRP_UHD_i::setupTuner(size_t, const frontend_tuner_allocation_struct&)’:
USRP_UHD.cpp:693: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:706: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:724: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘size_t’
USRP_UHD.cpp:730: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘size_t’
USRP_UHD.cpp: In member function ‘bool USRP_UHD_i::enableTuner(size_t, bool)’:
USRP_UHD.cpp:761: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:761: error: ‘uhd’ has not been declared
USRP_UHD.cpp:776: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:776: error: ‘uhd’ has not been declared
USRP_UHD.cpp: In member function ‘void USRP_UHD_i::updateAvaiableUsrpSeq()’:
USRP_UHD.cpp:1020: error: ‘uhd’ has not been declared
USRP_UHD.cpp:1020: error: expected ‘;’ before ‘himt’
USRP_UHD.cpp:1021: error: ‘uhd’ has not been declared
USRP_UHD.cpp:1021: error: expected ‘;’ before ‘device_addrs’
USRP_UHD.cpp:1022: error: ‘device_addrs’ was not declared in this scope
USRP_UHD.cpp:1024: error: ‘device_addrs’ was not declared in this scope
USRP_UHD.cpp:1027: error: expected primary-expression before ‘key’
USRP_UHD.cpp:1027: error: ‘BOOST_FOREACH’ was not declared in this scope
USRP_UHD.cpp:1027: error: expected ‘;’ before ‘{’ token
USRP_UHD.cpp: In member function ‘void USRP_UHD_i::update_myDeviceSeq()’:
USRP_UHD.cpp:1045: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:1052: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:1062: error: ‘uhd’ has not been declared
USRP_UHD.cpp:1075: error: ‘usrpDevice’ was not declared in this scope
USRP_UHD.cpp:1084: error: ‘uhd’ has not been declared
make: *** [USRP_UHD-USRP_UHD.o] Error 1
09:30:49 Build Finished (took 11s.457ms)
This is an issue in the boost header files from RHEL/CentOS 6.4. You need to patch the boost file by editing the file /usr/include/boost/exception_ptr.hpp (which requires sudo). Add the following lines starting at line 92:
~exception_ptr() throw()
{
}
Source 1
This should take care of your exception throw errors.
Additionally, you need to add the pre-requisite files and download the source code for the USRP drivers. Download the UHD source and download the dependencies as follows:
git clone https://github.com/EttusResearch/uhd.git
sudo yum -y install boost-devel libusb1-devel python-cheetah doxygen python-docutils
Next, go into your uhd folder and into host folder and generate the makefiles.
cd uhd/host
mkdir build
cd build
cmake ../
make
make test
sudo make install
sudo ldconfig
Source 2
Source 3
Now try building the USRP_UHD project. Following these steps I was able to replicate your issues and have a successful build. As for your two questions, I do not have GNUHawk installed so you do not need it to build this project.

Unknown symbol dentry_path

I'm using the method dentry_path in my kernel module, compilation work fine but when loading the kernel module I go the error message:
Error: could not insert module my_mod.ko: Unknown symbol in module
And in /var/log/kern.log
May 8 19:45:10 zUbuntu kernel: [ 1173.105984] my_mod: Unknown symbol dentry_path (err 0)
This method is declared like the following:
extern char *dentry_path(struct dentry *, char *, int);
Could you please explain me why I can't link my module using this method ?
I think you need to use dentry_path_raw instead of dentry_path, cause dentry_path isn't exported. Also, dentry_path_raw is the safer version between these two, it's protected with a writelock.

not building with ./build_native.sh and android- ndk-r8 in cocos2d-x

I have downloaded the source code for a projet in cocos2d-x.
I am using the ./build_native.sh from the Hello World example, which is sure it works.
Yet again I am getting this error when compiling:
Gdbserver : [arm-linux-androideabi-4.6] libs/armeabi/gdbserver
Gdbsetup : libs/armeabi/gdb.setup
Compile++ thumb : cocos2d <= CCGrabber.cpp
jni/../../libs/cocos2dx/effects/CCGrabber.cpp: In constructor 'cocos2d::CCGrabber::CCGrabber()':
jni/../../libs/cocos2dx/effects/CCGrabber.cpp:46:32: error: 'glGenFramebuffersOES' was not declared in this scope
jni/../../libs/cocos2dx/effects/CCGrabber.cpp: In member function 'void cocos2d::CCGrabber::grab(cocos2d::CCTexture2D*)':
jni/../../libs/cocos2dx/effects/CCGrabber.cpp:61:47: error: 'glBindFramebufferOES' was not declared in this scope
jni/../../libs/cocos2dx/effects/CCGrabber.cpp:65:26: error: 'glFramebufferTexture2DOES' was not declared in this scope
jni/../../libs/cocos2dx/effects/CCGrabber.cpp:68:63: error: 'glCheckFramebufferStatusOES' was not declared in this scope
jni/../../libs/cocos2dx/effects/CCGrabber.cpp: In member function 'void cocos2d::CCGrabber::beforeRender(cocos2d::CCTexture2D*)':
jni/../../libs/cocos2dx/effects/CCGrabber.cpp:88:47: error: 'glBindFramebufferOES' was not declared in this scope
jni/../../libs/cocos2dx/effects/CCGrabber.cpp: In member function 'void cocos2d::CCGrabber::afterRender(cocos2d::CCTexture2D*)':
jni/../../libs/cocos2dx/effects/CCGrabber.cpp:113:50: error: 'glBindFramebufferOES' was not declared in this scope
jni/../../libs/cocos2dx/effects/CCGrabber.cpp: In destructor 'virtual cocos2d::CCGrabber::~CCGrabber()':
jni/../../libs/cocos2dx/effects/CCGrabber.cpp:127:35: error: 'glDeleteFramebuffersOES' was not declared in this scope
I searched and found this sollution. But it does not work for me. I am still getting the same error. Maybe it is different in ndk-r8 whilst the sollution is for ndk-r7.
Any help?
Your android sdk version must bigger than 2.2.because from 2.2,the android begin to support opengl es 2.0,and the cocos2d-x 2.0 use the opengles 2.0 to render

Resources