Questions tagged [compilation-errors]
An error that is generated during the compilation phase, often due to problems with invalid syntax and/or types. Not for errors during the uploading or execution phase.
134 questions
0
votes
1
answer
60
views
esp_now_send takes a non-const uint8 mac address. Why? Does it modify it in some way?
I am using the Arduino IDE to do ESP-NOW communication with an ESP8266.
In espnow.h, on line 53 I find the function prototype:
int esp_now_send(u8 *da, u8 *data, int len);
Why does it take the mac ...
1
vote
0
answers
46
views
"'StructName' does not name a type" when returning struct, but trailing return type works [duplicate]
Note: Please, do actually read the question before voting to close. This only happens in arduino IDE, this is not about a generic "Does not name a type" error. The code is perfectly valid as ...
0
votes
1
answer
96
views
ATtiny25 - assembly - BOD disable for sleep mode - error [closed]
If I understood the AVR instruction manual correctly, the ATtiny 25 can disable the BODlevel2 fuse by software, but when compiling with Studio 7 (version 7.0.132), I get the error "Undefined ...
-2
votes
1
answer
226
views
Some of my <include> statements do not work [closed]
I'm trying to include the thing...
#include <BLEDevice.h>
#include <BLEServer.h>
#include <BLEUtils.h>
#include <BLE2902.h>
BLEServer* pServer = NULL;
...
2
votes
5
answers
397
views
Break a big file into smaller files
I had a really big .ino file and I decided to break it down into sub-files.
So I had the .ino file, the globals.h file and the functions.h file.
I moved all the global vars and functions to their ...
5
votes
1
answer
1k
views
Library not found when using the arduino-cli command (although working with the Arduino IDE)
I have a sketch which I can upload without problem with the Arduino IDE. I installed the arduino-cli Version: 0.28.0 Commit: 06fb1909 Date: 2022-10-18T15:53:04Z. I want to compile and upload a code ...
2
votes
1
answer
128
views
error: 'MonoOutput' has not been declared (Mozzi library, Arduino Nano)
I know this error is specific to this particular family of sketches, but please bear with me; when I try to compile this against an Arduino Nano/Uno (with Arduino IDE 1.8.15) the compiler complains ...
-1
votes
1
answer
112
views
Initializing an object as class member resulting in linking error?
I'm a little dumbfounded as to why this isn't working. I keep getting the following linker error:
In file included from src\ac.cpp:1:0:
src/ac.h:9:21: error: expected identifier before numeric ...
1
vote
1
answer
919
views
Add library to CLion project
I have a new project created with PlatformIO in CLion. I've copied the Servo-1.1.8 library into the include directory.
#include <Arduino.h>
#include "Servo-1.1.8/src/Servo.h"
Servo ...
1
vote
0
answers
271
views
Arduino IDE Java error
I'm running IDE version 1.8.16 under Windows 10.
Frequently I get the error message. The situation is solved only when exiting the IDE. Afterwards the compilation may be finished with or without ...
0
votes
1
answer
481
views
Problem in upload bootloader into esp32
I have problem with my esp32 Device and asked one question as you can see below:
How to understand the ESP32 is working (Error: Arduino unknown board ...)
As it is not fixed, so I am thinking to ...
0
votes
4
answers
1k
views
What should I do with stackOverflow in compile error?
I don't have port, but when I want to compile my code (even empty files),
I encounter this error:
Sketch uses 444 bytes (1%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 ...
1
vote
1
answer
941
views
Unable to compile c++11 libraries despite having added -std=c++11 in platform.txt
I want to use c++ data structures such as vectors, arrays, map... in my Arduino sketch. I made sure to add -std=c++11 and -std=gnu++11 in platform.txt, I am still getting the following error message:
...
3
votes
1
answer
2k
views
How to enable exception handling on the Arduino Due?
While the question here gives some hints, the solution provided there does not directly work on the Due, since it uses a different compiler and toolkit. Also, the Due has more than enough flash for ...
0
votes
1
answer
914
views
Why am I getting a "SendCommand was not declared" error?
#include <Adafruit_Fingerprint.h>
#include <SoftwareSerial.h>
#include <LiquidCrystal.h>
uint8_t id;
int getFingerprintIDez();
//pin #16 is IN from sensor (GREEN wire)
//pin #15 is ...
0
votes
1
answer
652
views
Arduino expected ')' before '{' token
for (byte i = 0; i < mfrc522.uid.size; i++)
{
Serial.print(mfrc522.uid.uidByte{i} < 0x10 ? " 0" : " ");
Serial.print(mfrc522.uid.uidByte{i}, HEX);
content....
0
votes
0
answers
755
views
Error compiling for board NodeMCU 1.0
i tried compiling a program to upload sensor readings that i connected with my ESP8266 to cloud (in my case, Antares) but i keep getting this error message. Can anyone tell me where the problem is, ...
1
vote
1
answer
140
views
Error message - Need help
I found this Haptic Headband project on YouTube (link below) and I am trying to verify the code that was given in the instructions with the Arduino IDE. However, I keep getting the message below and ...
0
votes
3
answers
647
views
How to capture the compilaton output to a text file in Windows?
I am trying to capture the verbose output of the compilation to get it into a text file. I am using the IDE 1.8.12 running on Windows 10. I have tried looking for a right mouse button context menu, ...
1
vote
1
answer
3k
views
error at compiling : 'class TwoWire' has no member named 'setClock'
I am a newbie C programmer and I just started with Arduino web editor (Win10-Firefox)to code for a Raspberry Pi (3B) board. RPi is on line via ethernet connection.
I tried to compile an example from ...
0
votes
1
answer
377
views
pubsubclient won't compile in Arduino and VSCode IDEs
I've compiled successfully a year ago in Arduino IDE, but lately I'm getting fatal errors:
/Users/davidjeffers/Documents/Arduino/libraries/PubSubClient/src/PubSubClient.cpp: At global scope:
/Users/...
0
votes
1
answer
715
views
Error compiling for board Arduino Uno
I am relatively new to Arduino and I am trying to code some neo pixels and every time I try to verify my code this error comes up:
Arduino: 1.8.12 (Mac OS X), Board: "Arduino Uno"
loading ...
0
votes
1
answer
420
views
I have a question,an error occured in my code saying TIMSK was not declared in the scope(There are no errors)
#include <SmartInventor.h>
void setup() {
SmartInventor.DCMotorUse();
}
void loop() {
// M1, M2, M3
// CW, CCW, STOP
// 0-100
// 0-360
SmartInventor.DCMotor(M1, CW, 10);
delay(...
0
votes
1
answer
62
views
Matching incoming data with a variable
I have a system where an RFID tag can be checked and Its individual 4byte UID will be printed. My task is to check if subsequent tags have the same UID and if not, print “access denied”. I'm assuming ...
0
votes
1
answer
2k
views
ESP8266 compilation error: "previous declaration of 'HTTPMethod HTTP_HEAD'"
I have an ESP8266 program that used to work but is now failing to compile with this error:
C:\...\Arduino\libraries\WiFiManager/WiFiManager.h:25:24: note: in expansion of macro 'PROGMEM'
const ...