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.

Filter by
Sorted by
Tagged with
0
votes
1answer
24 views

Arduino Uno First Program [duplicate]

Please help with this error. Arduino: 1.8.10 (Windows 10), Board: "Arduino Uno" Sketch uses 882 bytes (2%) of program storage space. Maximum is 32256 bytes. Global variables use 9 bytes (0%) of ...
0
votes
1answer
57 views

Can't use uint16_t in library

I wonder why the following minimal example sketch doesn't compile (unknown type name 'uint16_t'): sketch_does_not_compile.ino: #include "myheader.h" void setup() { char a[]="hello world"; ...
0
votes
2answers
38 views

Unable to declare variable in a library that doesn't have a class: multiple definition of the variable

I have created a library Lib that doesn't have a class. I want this library to have a variable that can be accessed from outside. The way I would go about this is to just declare them in the header ...
0
votes
1answer
42 views

Error: function was not declared in this scope when using a library without classes

I have created a library of functions that doesn't have and mustn't have a class. In order to have functions inside the library that can only be called from the library itself, you just write them ...
0
votes
1answer
31 views

Compilation Error - Yellow LED blinking as I have installed & connected Arduino UNO board to Windows XP PC

This is the first time when I have installed Arduino IDE (arduino-1.8.10-windows.exe) in my Win. XP SP-3 OS and it seems that the Arduino IDE software installation is successful without any hitch. ...
-1
votes
2answers
130 views

Compile code error: 'Serial' does not name a type

int LDR_deger = 0; int Ledpin1 = 12; int Ledpin2 = 11; int Ledpin3 = 10; int Ledpin4 = 9; int Ledpin5 = 8; int LDR_pin = 0; void setup() { Serial.begin(9600); pinMode(Ledpin1, OUTPUT); ...
0
votes
2answers
37 views

I don't know why this type of come in my program expected initializer before 'if' [closed]

#include <iostream> #include <stdlib.h> using namespace std; void menu(){ cout<<"1 : First Grade"<<endl; cout<<"2 : Second Grade"<<endl; cout<<"...
0
votes
1answer
38 views

Creating an array with the length coming from a library

When creating an array like in the sketch #include <Lib.h> int myArray[Lib::len]; void setup() {} void loop() {} the variable len must be an integer constant that is known at compile time. ...
0
votes
1answer
205 views

Error: invalid application of 'sizeof' to incomplete type 'int []' when trying to compute the size of an array in a library

I have created a library that contains an array. This is the .h file: class Lib { public: static int arr[]; }; And this is the .cpp file: #include "Lib.h" int Lib::arr[] = {0, 1, 2, 3}; ...
0
votes
1answer
52 views

Using a class inside of another class [closed]

I have a seemingly simple problem that seems to be popular, but after searching several forums I still have not found the answer: How do you use a class inside of another class? I have simplified my ...
1
vote
1answer
748 views

Library compilation error

Need help for this Tutorial. I tried to compile the code, but I'm getting compiling error. I tried to ask on that forum too but got no answer, the error is: In file included from C:\Program Files (...
0
votes
0answers
379 views

FatalError('Invalid head of packet (0x%s)' % hexify(b)) while uploading on ESP8266

I have this error while uploading my code to ESP8266 despite the fact that the code runs without errors. I have the git version of installation for the board. ERROR: File"C:/../../AppData/Local/...
0
votes
0answers
63 views

mlx90614 Error compiling for board Arduino/Genuino Uno

I have testing for mlx90614 library (https://github.com/stevemarple/MLX90614) for my Arduino uno, with this demo codes: #include <AsyncDelay.h> #include <SoftWire.h> #include <MLX90614....
0
votes
1answer
341 views

Error: “'lcd' does not name a type” using LiquidCrystal library

I'm following an online Arduino tutorial/course and trying to make a simple moving character on an LCD screen, but for some reason I get the following error: "error: 'lcd' does not name a type". I'm ...
2
votes
1answer
35 views

Remove Function at Preprocessor Time

I have a single function for debugging messages, used through all the project. When KEYDEBUG is defined as 1 or 0, the function is enabled or disabled as required. #define KEYDEBUG 0 void debugging(...
1
vote
0answers
466 views

error compiling for board node MCU 1.0

Arduino: 1.8.9 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Serial, 115200, 4M (3M SPIFFS)" In file included from C:\Users\Priyaranjan Tiwari\Documents\Arduino\007mcu_php\007mcu_php....
0
votes
2answers
56 views

Compile error in Ubuntu 18.04

I'm trying to compile a code to arudino pro micro, I have the right option for compiling like the port and the type of the board,but I get an error,I can't copy
1
vote
1answer
592 views

Error “avr-g++: error: CreateProcess: No such file or directory” When Compiling Script

Whenever I try to compile a script, the Arduino IDE throws the error avr-g++: error: CreateProcess: No such file or directory. I've already tried reinstalling the IDE, changing the board version in ...
1
vote
1answer
408 views

Using SoftwareSerial.h in .cpp file

I am trying to modularize the different components in my arduino build by using objects, but am having trouble with the one controlling a wireless transceiver, which uses SoftwareSerial.h I believe I ...
2
votes
1answer
164 views

Two libraries collide. Ambiguous functions/variables?

I get several errors once I try to include these two libraries: error: expected unqualified-id before '{' token #define DEBUG_PRINTLN(...) {} #include <DHT.h> #include <DGS.h> ...
0
votes
2answers
355 views

DigiSpark AT Tiny85 compile problem?

Friend asked me to find problem with compilation for his DigiSpark AT Tiny85 board. We are trying to compile sketch from here: https://forum.arduino.cc/index.php?topic=314773.0 But with no luck - ...
-1
votes
1answer
264 views

Error compiling for any board arduino ide 1.8.9

my arduino ide Until yesterday it worked properly . but today All previous projects dont compiling and all of them have one error : Error compiling for board and It's no different that Which board ...
0
votes
0answers
31 views

Code compilation errors for 101 - no errors with Uno

I asked this question before a few days ago about undefined references errors to custom library functions. By accident I found that the code compiled fine when the board target was set to an Uno, not ...
0
votes
2answers
44 views

Project wont compile when I place functions below function calls [closed]

I use VSCode, not the Arduino IDE. I saw and tried to use a lot of code snippets which are provided for Arduino projects... So when I copy/paste these examples into my VSCode and try to compile it ...
0
votes
1answer
73 views

Mega code not compiling on Wemos Mega board

Hi I have some code that I'm trying to port from a Mega 2560 R3 to a Wemos Mega. #include "SoftPWM.h" #include ESP8266WiFi.h // Outputs to PWM & H bridge direction // PWMs: // DC_pwm, left_pwm, ...
0
votes
1answer
31 views

Path relater errors on compilation in Arduino IDE 1.8.5 under Windows XP

For the XP under the Russian locale I'm getting the strange output when trying to compile Marlin project for Anycoubic 3d printer according to instruction https://3dtoday.ru/blogs/trialon/marlin119-...
-2
votes
1answer
35 views

Use 2 DHT22 AND PASS THE DATA TO SD Error File data does not exsist

anyone can help me please to fix this error when I try to compilate says File does not exsist. It would be great if anyone can post the entirely code. Link of code below if anyone can help me please: ...
2
votes
1answer
1k views

Selected board depends on 'arduino' core (not installed)

When I load the Arduino IDE with Board: Pololu A-Star 32U4 selected, I see: The current selected board needs the core 'arduino:arduino' that is not installed. I installed the board manually via ...
0
votes
1answer
865 views

Multiple definition error when linking firmware.elf

I just can't wrap my head around on how to properly work with multiple files. My code has been getting quite big so I decided to split all the classes into one file each. So I'm left with 6 files: ...
0
votes
1answer
149 views

How to add if condition in RFID example?

Using an Arduino Mega 2560 and PN532 NFC/RFID module, I want to be able to scan a card and see if its value is (0xF0, 0x21, 0x5D, 0xA7). It should print "accepted" in the serial monitor. However ...
0
votes
4answers
3k views

Strange compiler error (Segmentation Fault)

You're getting a compiler error. It happens in strange parts of code that really shouldn't be having a problem. The error looks something like: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8....
0
votes
1answer
176 views

compilation error when changing variable from char to String

I have a code with these two lines: char handshakecode = "S"; // Capital S char receive; The lines of code are placed in a separate void, and not setup or loop. When i change the two variables ...
-1
votes
1answer
48 views

Can the function be written without “;” in the end? [closed]

I have seen the following code on the Internet: #include <SoftwareSerial.h> SoftwareSerial mySerial(8,9); void setup() { mySerial.begin(9600); Serial.begin(9600); delay(100); } ...
1
vote
1answer
57 views

How to deal with this array correctly?

I am using a led strip WS2812b, an ESP8266 (NodeMCU 1.0) and a gesture sensor APDS9960. I want that when I move my hand from left to right and from right to left I change the colors of the strip of ...
0
votes
1answer
573 views

“exit status 1” error when invoking “useInterrupt” method [duplicate]

for context to this post you can catch up on this post I am working with an Arduino Leonardo and Adafruit Music Maker shield. I am trying to use the startPlayingFile method via the interrupt pin ...
0
votes
2answers
234 views

Include in different file make different compiling error

I'm have problem compiling a code. ardutest.ino: #include "mylib.h" #include <SD.h> void setup() { } void loop() { fn(); } mylib.h: #ifndef mylib_h #define mylib_h #include "Arduino.h" ...
1
vote
3answers
3k views

error: expected primary-expression before '(' token

I have a decent level of programming skill, or at least I thought so. I've been getting an error when compiling this Ardulno sketch. I don't really know what this error means or how to fix it. What's ...
0
votes
1answer
1k views

compile error when using two typename in template class

I am using Arduino 1.8.5 ide. I am just creating a class with two typename which name is "Map". This class takes all int and String variations. Like; class Map<int, int>; class Map<int, ...
0
votes
0answers
204 views

Blink example compilation error

I just installed the Arduino IDE on Mac and connected the programming port to my Arduino Due. I selected the corresponding board from Tools (though not sure which ATMEL programmer I should choose) I ...
0
votes
1answer
730 views

I get a redefinition of “…” on every single line, of every variable, class, function, etc

When I compile my program I get an error message saying redefinition of "..." on every single line, of every variable, class, function, etc. What am I doing wrong? int incomingByte = 0; // for ...
0
votes
1answer
994 views

“Does not name a type” error with Serial.print

I am getting an error that I have never seen before and don't know how to fix. Basically I am trying to print a string (stored in thermistor) to the serial monitor. When I run the code I get an error ...
0
votes
0answers
101 views

Arduino Zero AnalogReadFast Compiling Error

#include <Streaming.h> #include <StopWatch.h> #include <Albert.h> #include "avdweb_AnalogReadFast.h" const byte adcPin = A1; void setup(void) { Serial.begin(9600); while(!...
-1
votes
1answer
3k views

IOT-GA6 gsm module Arduino +CME error 58

I've recently bought a IOT-GA6 gsm module . I want to use it to send an mms but doesn't work. The SMS and call work. When I execute the void function (mms) the monitor shows the error message +CME ...
0
votes
1answer
293 views

Compile Problem with RFDuino RFD22301

I have the following setup: - Arduino IDE for Mac 1.8.5 - RFDuino RFD220301 - CP2102 USB to UART connector - Board set to "RFduino" - port set correctly (but shouldn't matter as it is a compile error) ...
1
vote
1answer
755 views

Error: “undefined reference to …” when calling non-void class' functions from within class

I haven't used an Arduino for anything as complicated as this project before (single sketch projects so far), and am struggling getting my code to compile now that I'm creating my own libraries for ...
0
votes
0answers
73 views

The board is not uploading the code and returning the error message below. I use Ubuntu 18.04

Arduino: 1.8.6 Hourly Build 2018/04/03 01:25 (Linux), Board: "Arduino/Genuino Uno" Archiving built core (caching) in: /tmp/arduino_cache_780208/core/...
0
votes
2answers
16k views

I have the error: expected unqualified-id before 'if'

This is my Sketch or code: const int EchoPin = 5; const int TriggerPin = 6; const int LedPin = 13; void setup() { Serial.begin(9600); pinMode(LedPin, OUTPUT); pinMode(TriggerPin, OUTPUT); ...
-2
votes
2answers
8k views

Error : stray '\' in program

I got this error in the following program: #include <SoftwareSerial.h> #include <dht.h> dht DHT; int a; String temp; String humid; SoftwareSerial esp(0, 1); #define SSID "abcd" #define ...
0
votes
1answer
680 views

i586-poky-linux-g++: no such file or directory Error compiling for board Intel® Edison

I'm facing this compilation issue. Arduino: 1.8.4 (Linux), Board: "Intel® Edison" fork/exec /home/jimish/.arduino15/packages/Intel/tools/core2-32-poky-linux/1.6.2+1.0/i686/sysroots/pokysdk/usr/bin/...
0
votes
2answers
107 views

What is wrong with this code?

So I am writing code to control a servo with an RC radio. I am using an Arduino Mega. I get this error whenever I compile. I am not that experienced with Arduino so I am probably not doing something ...