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
19 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
1answer
16 views

I am getting an error while trying to set up the U8g2 library

I am just trying to set up the U8g2 library to use an OLED. I read through the documentation and tried copying and pasting the code block example for the constructor, but switched out their ...
0
votes
0answers
30 views

Error compiling for board Arduino Mega or Mega 2560

#include <Servo.h> // Include Servo Library #include <NewPing.h> // Include Newping Library #include<SoftwareSerial.h> #include <dht.h> //Include the DHT library ...
-1
votes
1answer
48 views

Function 'backward' was not declared in this scope (error message) [closed]

Code: #include <SoftwareSerial.h> SoftwareSerial BTSerial(10, 11); // CONNECT BT RX PIN TO ARDUINO 11 PIN | CONNECT BT TX PIN TO ARDUINO 10 PIN char tiltDirection; int motorInput1 = 2; int ...
0
votes
0answers
28 views

Why does this code only compile when moving the setup() function or using an older Arduino IDE? [duplicate]

The following code does not compile using Arduino 1.8.13: void setup() {} template<typename T,size_t N> struct foo { T t[N]; }; void ok() { foo<int,1> var; } void notOK( foo<...
1
vote
1answer
102 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
1answer
28 views

trying to make wemos d1 code modular causes collect2: error: ld returned 1 exit status exit status 1

#include "connection.h" void setup() { Serial.begin(115200); Funcs::Connect conn; conn.connectWifi(); } void loop() { } then connection.h file: // connection.h namespace Funcs { class ...
0
votes
1answer
34 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
1answer
50 views

Esp8266: Linux - fatal: No names found and undefined reference to `app_entry_custom()'

as Gentoo user I build everything from sources, but I have problem with building toolchain for esp8266. I came up with this script: #!/bin/sh # note: eselect python2 before, because of gcc # ...
0
votes
1answer
62 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
1answer
164 views

Error compiling for board Arduino Nano

I have multiple Arduino Nano boards. I am able to compile or upload code only once. If I try to compile/upload again I get an error: "Error compiling for board Arduino Nano". However there is a ...
0
votes
1answer
79 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
1answer
75 views

when i finished coding my 3 dc motors, all these errors accrued one said stray '/302' in the program [closed]

/* #include <SmartInventor.h> */ void setup() { SmartInventor.DCMotor(); } void loop() { // M1, M2, M3 // CW, CCW, STOP // 0-100 // 0-360 SmartInventor.DCMotor(M1, CW, 10, 45°);...
-2
votes
1answer
104 views

Having issue with a redeclaration as a different kind of symbol

Been struggling with this for a few days and I suspect that i have several issues but I cannot find them. Project: Need a serial count that counts by 5-50 and a button interrupt should trigger a ...
0
votes
1answer
29 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 ...
1
vote
0answers
153 views

Error compiling for board Arduino Nano 33 BLE

I am trying to use pulse sensor with Arduino Nano 33 BLE sense, but when I verify it, it shows Error compiling for board Arduino Nano 33 BLE. The code is from the pulse sensor website. The code works ...
0
votes
1answer
25 views

Exit status 1 can't compile [closed]

I am a complete beginner with very little knowledge. I am trying to do a switch in Arduino UNO using a guide I found on the internet but it won't compile. The servo motor should function if it is ...
0
votes
1answer
552 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 ...
0
votes
1answer
31 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
123 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
46 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
354 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
69 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
284 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
40 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
43 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
2k 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
65 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
982 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
738 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
1answer
911 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
39 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
600 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
79 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
1k 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
494 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
171 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
819 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
637 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 ...
1
vote
0answers
33 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
46 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
97 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
58 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
36 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: ...
3
votes
1answer
2k 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
1k 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
255 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 ...
1
vote
4answers
4k 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
298 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
49 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); } ...