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
17 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
33 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
24 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
46 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
31 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
35 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
155 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
65 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 - ...
0
votes
1answer
87 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
30 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
42 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
45 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
13 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
514 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
392 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
58 views

How to add if condition with RFID Example

Using a Arduino Mega 2560 and PN532 NFC/RFID module, I want to be able to scan a card and see if it's value is (0xF0, 0x21, 0x5D, 0xA7). It should print "accepted" in the serial monitor. However ...
0
votes
3answers
2k 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
135 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
46 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
41 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
523 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
134 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
2k 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
972 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
161 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
513 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
673 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
74 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(!...
0
votes
0answers
2k 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
253 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
573 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
64 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
9k 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
6k 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
519 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
104 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 ...
0
votes
1answer
458 views

What is wrong with my code? Did you forget '()'?

#include <SimbleeBLE.h> // constants won't change. They're used here to set pin numbers: const int ButtonPlayPause = 15; const int ButtonNext = 12; const int ButtonPrevious = 11; const int ...
0
votes
1answer
480 views

avr_g++ compiler error: expected primary-expression before '.' token (C code in .ino)

The compiler is complaining about a macro defined in mjson.h Documents\Arduino\libraries\microjson/mjson.h:135:28: error: expected primary-expression before '.' token #define STRUCTOBJECT(s, f) ....
0
votes
3answers
5k views

How can i get rid of the error “cannot convert 'String' to 'const char*'”

I want to get this code to recognise different commands and be able to parse the rest of the command, fore example I send "/sleep 5", and it will sleep for 5 seconds. However, I keep on getting this ...
-1
votes
1answer
3k views

'import' does not name type ERROR

I am working with a group of people on an arduino controlled BB8 robot. We are using an IMU unit (accelerometer+gyroscope). I found a processing example for the IMU unit we are using. The code is ...
-2
votes
1answer
341 views

SOMETHING WRONG IN DHT22 PROGRAM showing error as expected unqualified id before'. ' token

I am using a arduino and dht22 sensor for my project purpose annd gettting error as expecte before unqualified '.' token MY CODE IS : #include <DHT.h> #include <LiquidCrystal.h> #...
1
vote
1answer
642 views

Ubuntu class string has no member remove

I am running some code that works fine on my windows system using the .remove method. On Ubuntu 16.04 I get the following errror: error: ‘class String’ has no member named ‘remove’ To see if it ...
0
votes
1answer
38 views

Constants within array of structs causes strange compiler errors?

In my sketch I have the following: #define HU_ADDR 0x190; #define ALL_AUDIO_ADDR 0x1FF; #define MY_ADDR 0x360; #define UNKNOWN_ADDR 0xFFF; typedef ...
2
votes
2answers
175 views

Purposely create compile error to fail the upload [closed]

I would like to create a compile error so sketch does not upload in certain cases. I have written a library with a function that adds pins being used to an array. If the same pin is used twice I ...
14
votes
1answer
2k views

Why can't my IF statement see a global?

I'm rather new to Arduino programming. I have a problem compiling the following bit of code: const int relay1 = 10; //Power Relay 1 const int relay2 = 11; //Power Relay 2 const int relay3 = 12; //...
1
vote
0answers
36 views

Are there documented Arduino class or file name restrictions?

I ran into a strange problem were the compiler could not find a header file that I knew existed. The problem was I created a class called ArduinoEvent and put it in ArduinoEvent.hpp, but when I ...
0
votes
1answer
215 views

Problem uploading the code into an Arduino Uno [duplicate]

I was trying to upload code for a blinking LED. It is a new Arduino Uno board. Any further help will be appreciated.I got the following error: Info.: OS- Ubuntu 16.04 Software: Arduino IDE 1.8....
-1
votes
3answers
1k views

Need help on the “expected primary expression before ”}“ token”

#include <SPI.h> #include <nRF24L01.h> #include <RF24.h> #include "Arduino.h" #include "SoftwareSerial.h" #include "DFRobotDFPlayerMini.h" #define M11 2 #define M12 3 #define M13 ...
0
votes
0answers
1k views

Does not name a type error

Hi i am getting the following errors when trying to do coding. C:\Program Files (x86)\Arduino\libraries\KTA259V3-master/KTA259V3.h: 51:5: error: 'Adafruit_MAX31855_Info' does not name a type ...