I compile a sketch in Arduino IDE, the code includes sha256.h library:
...
#include "sha256.h"
...
When the codes are compiled, the error says:
fatal error: sha256.h: No such file or directory
I try to install sha256 library from Sketch > Include Library > Manage Libraries, but there are no such library listed.
Where can I get the included library?
Without having more information like the names of some of the functions being called that need this header file it's hard to pin it down. There are several Arduino libraries out there that have a sha256.h header file.
You might try:
ESP8266-Arduino-cryptolibs - not available through the library manager, so you'd copy this manually into the Arduino libraries folder
"AWS-SDK-ESP8266" - available through the library manager
There are others that aren't ESP8266-specific; a simple Google search for 'sha256.h esp8266' or 'sha256.h arduino' will find them.
Related
I am attempting to upload a script onto my Digispark ATTINY85. I have installed all the correct packages on Arduino IDE. However when I try upload the script, I get this error:
Compilation error: fork/exec /Users/me/Library/Arduino15/packages/arduino/tools/avr-gcc/4.8.1-arduino5/bin/avr-g++: bad CPU type in executable
I am running on macOS Monterey 12.2.1 with Apple M1.
I have tried following this stack question, however then I am left with the following error:
bin/avr-g++: No such file or directory
I encountered the same problem and was able to fix it like this:
Delete / uninstall all previous Digispark boards
In the Arduino IDE under Preferences > Additional boards manager URLs replace the original digistump URL with https://raw.githubusercontent.com/ArminJo/DigistumpArduino/master/package_digistump_index.json
Reinstall the Digistump AVR Boards via Tools > Boards Manager. At this point I was able to compile the sketch, but not to upload it.
I had to downgrade to 1.7.2. Download the files from here.
Open ~/Library/Arduino15/packages/digistump/hardware/avr delete the content and insert the unpacked files from digistump-avr-1.7.1.zip
Go to ~/Library/Arduino15/packages/digistump/tools/micronucleus and create a folder with the name 2.5 if it does not exist yet. Delete everything else.
Go to the files that you downloaded and unpack /tools/micronucleus-cli-2.5-x86_64-apple-darwin.tar.gz it should create a new folder micronucleus
I am using Code::Blocks IDE on Debian 8. I have installed the plplot library form synaptic (not from source). When I create new project in C::B and try to run a simple plplot example the compiler do not recognize the includes and the linker do not recognize the plplot library. So how to compile and link with plplot library when I have installed it from Synaptic not from source? Is this possible, or I should remove current packages and install from source only?
In general when I install new library (from synaptic or from source) how to find out what should be the compiler flags and search directories and for the linker too? I think installing from source should be the less problems prone way!
Till now I am doing file search for the included header and add its directory to the search path for the compiler. But this is very cumbersome and naive approach. It will be better if I add compiler flag that does all this job, but how to find it out. Some flags I find in forums but not in the documentation of the libraries. Why there is no file with the third program library to tell what flags should one use? Nevertheless when the o files are done I have linker errors like "undefined reference to...".
For the plplot library the linker flag should be -lplplotd. For the compiler options I have no flags but I did a search for the unknown headers and added their directories to the search directories path. Now the Example 00 works fine. Though I found the -lplplotd flag by shooting! For the x11 examples one should add the flag -lplplotcxxd.
In general I got that to find the linker flag I have to search for the library so file and the name of the file commonly is the flag, e.g. for the library libplplotcxxd.so the flag is -lplplotcxxd.
Anyway, I'd be glad if someone tells me a better clue on finding these linker flags.
I am trying to get familiar with Alljoyn Thin Core Library (15.09) and my current goal is to run the example from AJTCL_DIR\src\target\arduino\examples\AJ_LedService. The problem is I am not familiar with the Scons and there seems to be no guide for building AJTCL for arduino target (Arduino + freeRTOS is not what I need). Can anyone help me with building that library for Arduino, because my attempts to buid that with scons failed.scons buid output
For me the way to solve this problem was to edit file Sconscript.target.arduino.
I replaced these lines:
`# Install the .c files as .cpp files for the Arduino IDE to consume.
srcs = [
Glob('src/*.c'),
Glob('src/target/$TARG/*.c'),
Glob('src/crypto/*.c'),
Glob('external/sha2/*.c')
]`
with following:
`# Install the .c files as .cpp files for the Arduino IDE to consume.
srcs = []
srcs.extend(Glob('src/*.c'))
srcs.extend(Glob('src/target/$TARG/*.c'))
srcs.extend(Glob('src/crypto/*.c'))
srcs.extend(Glob('external/sha2/*.c'))`.
So list srcs contains file objects, not the list of file objects. After applying these changes lib was build successfully, but i stil have some problems with compilation.
In the "SConscript.target.arduino" file, change the variable with the correct path.
arduinoLibDir = '#dist/arduino_due/libraries/AllJoyn/'
Try;
scons WS=off VARIANT=debug TARG=arduino
I am not very sure if the builds(working) for Arduino are available yet. There is some work going on, to get the Arduino builds running.
here is the link to one of mails on the Allseen Core Working List.
Allseen Core Mailing List
I had tried to build them, even thought it built successfully i still had a few unreferenced libraries and hence the AJ_LedService example would not compile.!
I want to run the example found here: http://doc.qt.nokia.com/qtmobility-1.2/samplephonebook.html
But I have an error in this line:
QContactObserver* m_observer;
The error is:
ISO C++ forbids declaration of 'QContactObserver' with no type
in the contacteditor.h file.
What's wrong ? What should I do for that to run?
This question may well have already been solved for the original OP, but for the sake of other users stumbling onto it:
QContactObserver is part of Qt Mobility. Although Qt Mobility is included with the QtSDK, it must be unpacked and built on the development system to ensure that it is configured properly to be used in a project on that system.
In addition, the .pro file requires additions to prompt it to include the required Qt Mobility headers. For example, QContactObserver is part of the QtContacts module, so the .pro file would require the follwing additional lines:
CONFIG += mobility
MOBILITY += contacts
The error mentioned in the comments above:
MBX: you sure have a #include <QContactObserver>, don't you?
Marwa Shams: when i include it .. I have an error "no such file or directory"
occurs because Qt does not know where to look for the <QContactObserver> headers. Following the steps above will remedy the problem.
Hopefully this is an easy question:
I am building an application with Qt and would like to use Google's Protocol Buffers. I have downloaded and installed the protobuf source, now I want to link against it in my project.
My .pro file contains the line:
LIBS += -L/usr/local/lib -libprotobuf
However, I get the error:
:: error: library not found for -llibprotobuf
when trying to compile.
I am assuming that I am doing something rather basic wrong. Thanks for any help!
Assuming the file is libprotobuf.[so|a], the correct library link command is -lprotobuf (the lib prefix is implied)