Exit status 1, Error compiling for board Arduino/Genuino Uno. [Solved!]

#include <LiquidCrystal.h> //Include LCD library
#include <GSM.h> // Include the GSM library
#include <SoftwareSerial.h>

SoftwareSerial mySerial(9, 10); // RX,TX
LiquidCrystal lcd(12, 11, 5, 4, 3, 2); // initialize the library with the numbers of the interface pins
GSM gsmAccess; // initialize the library instance
GSM_SMS sms;

void SetAlert()
{
int sms_count = 1;
float Fire_Set;
while (sms_count < 3) //Number of SMS Alerts to be sent
{
SendTextMessage(); // Function to send AT Commands to GSM module
}
Fire_Set = 1;
lcd.setCursor(0, 1);
lcd.print("Gas Alert!SMS Sent");
}

void SendTextMessage()
{
int sms_count;
mySerial.println("AT+CMGF=1"); //To send SMS in Text Mode
delay(2000);
mySerial.println("AT+CMGS="+96171797525"\r"); // change to the phone number you using
delay(2000);
mySerial.println("GAS IN THE KITCHEN HURRY UP");//the content of the message
delay(200);
mySerial.println((char)50);//the stopping character
delay(5000);

sms_count++;
}

int potPin = A4;
int potValue = 0;
int buzzer = 6;
int sms_count = 0;

void setup() {

lcd.begin(16, 2); // lcd rows and columns
lcd.print("GAS SENSOR");
pinMode(6, OUTPUT);
mySerial.begin(9600);
Serial.begin(9600);
lcd.begin(16, 2);
delay(500);
}

void loop() {

potValue = analogRead(potPin);

lcd.setCursor(0, 1);
lcd.print("Value = ");
lcd.print(potValue);
delay(1000);
lcd.print(" ");
delay(1);

if (potValue > 200)

{
SetAlert(); // Function to send SMS Alerts
digitalWrite(6, HIGH); // 6 is the digital pin on arduino connected to buzzer
delay(100);
}
}

i got this error

When I compiled your code, I got:

SoftwareSerial\SoftwareSerial.cpp.o: In function __vector_3': C:\Users\PaulS\Documents\Arduino_160\hardware\arduino\avr\libraries\SoftwareSerial/SoftwareSerial.cpp:227: multiple definition of __vector_3'
GSM\GSM3SoftSerial.cpp.o:C:\Users\PaulS\Documents\Arduino_160\libraries\GSM\src/GSM3SoftSerial.cpp:499: first defined here

SoftwareSerial\SoftwareSerial.cpp.o: In function SoftwareSerial::read()': C:\Users\PaulS\Documents\Arduino_160\hardware\arduino\avr\libraries\SoftwareSerial/SoftwareSerial.cpp:392: multiple definition of __vector_4'
GSM\GSM3SoftSerial.cpp.o:C:\Users\PaulS\Documents\Arduino_160\libraries\GSM\src/GSM3SoftSerial.cpp:487: first defined here

SoftwareSerial\SoftwareSerial.cpp.o: In function SoftwareSerial::read()': C:\Users\PaulS\Documents\Arduino_160\hardware\arduino\avr\libraries\SoftwareSerial/SoftwareSerial.cpp:392: multiple definition of __vector_5'
GSM\GSM3SoftSerial.cpp.o:C:\Users\PaulS\Documents\Arduino_160\libraries\GSM\src/GSM3SoftSerial.cpp:487: first defined here
collect2.exe: error: ld returned 1 exit status
Error compiling.

You can NOT use SoftwareSerial and GSM at the same time.

Hi George, please do not hijack someone else's thread. Start your own and read the guidelines.
Thanks.

Using Arduino 1.8, uninstalled and re-installed Arduino

6 core, 16 gig RAM, 4k monitor, 8 gig video. Windows 10, McAafee .

just purchased 2 Adruino UNO (not clone or knock offs, original)

getting the following error when trying to verify (or compile) the "blink" program

or any other one as well.

A-HA, THE ISSUE IS THE McAfee VIRUS DETECTION PROGRAM
TURNED IT OFF AND EVERYTHING WORKS GREAT

Arduino: 1.8.0 (Windows 10), Board: "Arduino/Genuino Uno"

.
.
c:\arduino\hardware\tools\avr\bin../lib/gcc/avr/4.9.2/../../../../avr/bin/ar.exe:
unable to rename
'C:\Users\JAZYCO~1\AppData\Local\Temp\arduino_build_641869\core\core.a';
reason: Permission denied

exit status 1
Error compiling for board Arduino/Genuino Uno.

Thanks for any input

Howzit guys I am having the same problem. tried everything here but no luck getting it to work. Any advice???

I am using an Arduino Uno R3 and an Elecfreaks CANBUS shield.

I am not sure whats going on whether I need to upload another library (got the code off a site where they used a sparkfun CANBUS shield)

My code is as follows:

#include <Canbus.h> // don't forget to include these
#include <defaults.h>
#include <global.h>
#include <mcp2515.h>
#include <mcp2515_defs.h>

void setup() {

Serial.begin(9600); // For debug use
Serial.println("CAN Read - Testing receival of CAN Bus message");
delay(1000);

if (Canbus.init(CANSPEED_500)) //Initialise MCP2515 CAN controller at the specified speed
Serial.println("CAN Init ok");
else
Serial.println("Can't init CAN");

delay(1000);
}

void loop() {

tCAN message;
if (mcp2515_check_message())
{
if (mcp2515_get_message(&message))
{
if (message.id == 0x620 and message.data[2] == 0xFF) //uncomment when you want to filter
{

Serial.print("ID: ");
Serial.print(message.id, HEX);
Serial.print(", ");
Serial.print("Data: ");
Serial.print(message.header.length, DEC);

for (int i = 0; i < message.header.length; i++)
{
Serial.print(message.data*, HEX);*

  • Serial.print(" ");*
  • }*
  • Serial.println("");*
  • }*
  • }*
  • }*
    }
    [/quote]
    The error code is as follows:
    > Arduino: 1.6.13 (Windows 10), Board: "Arduino/Genuino Uno"
    > fatal error: Canbus.h: No such file or directory
    >
    > #include <Canbus.h> // don't forget to include these
    >
    > compilation terminated.
    >
    > exit status 1
    > Error compiling for board Arduino/Genuino Uno.

@JacquesNel

Please post code using code tags so the code does not randomly changes to italics and info falls away. Please edit your post.

You have not installed the library or installed it incorrectly.

Apologies for that will do that in the future.

I have installed the CAN BUS library and have been sending messeges over CANBUS from one arduino to the other as a test and everything worked perfectly. Could it be that I need another library added?

I have read that some guys install the Seeed library do you think this will fix my problem

thanks for the reply

Arduino: 1.8.1 (Windows Store 1.8.1.0) (Windows 10), Board: "Arduino/Genuino Uno"

C:\Users\noupa\AppData\Local\Temp\Temp1_RFIDuinoLibrary-master.zip\RFIDuinoLibrary-master\RFIDuino\examples\RFIDuino_helloWorld\RFIDuino_helloWorld.ino:36:53: fatal error: RFIDuino.h: No such file or directory

#include <RFIDuino.h> //include the RFIDuino Library

^

compilation terminated.

exit status 1
Error compiling for board Arduino/Genuino Uno.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

I am new to this stuff but love it.
Does anyone know why this error show and I am unable to compile or upload Hello World and Demo3 for IFID project. Please help! Thanks,

@MyNameIsNoukane

It looks like you're directly opening the ino file from within the zip file; I might be wrong. Not sure if that will work.

If you're indeed opening the ino file in the zip file, extract the zip file to a directory of choice first and next open the ino file in that directory; next compile.

#include
int RECV_PIN = 3;
IRrecv irrecv(RECV_PIN);
decode-results results;
void setup()
{
Serial.begin(9600);
irrecv.enableIRIn();
pinMode(13,OUTPUT);
}
void loop()
{
if (irrecv.decode(&results)) {// irrecv.decode(&results)
Serial.println(results.value, HEX);
if(results.value==0xFA08F7)
{
digitalWrite(13,HIGH);
else
digitalWrite(13,LOW);
delay(300);
irrecv.resume ();
}
}

Exit status 1
Error compiling for board arduino/genuino uno

#include

Include what?

not sure why

but I removed the in-line comments and now I can compile.

Guys,
I'm a newbie and trying to do a home-security system for school project. I did research on the internet an found a site with subject. Unfortunately, when I tried to run mine, I keep getting compile error (exit 1). I went line by line and could not find anything.
Can you pleas help? Thank you in advance.

#include <Keypad.h>
#include<LiquidCrystal.h>
#include<EEPROM.h>
LiquidCrystal lcd(9, 8, 7, 6, 5, 4);
char password[4];
char pass[4], pass1[4];
int i = 0;
char customKey = 0;
const byte ROWS = 4; //four rows
const byte COLS = 4; //four columns
char hexaKeys[ROWS][COLS] = {
{'1', '2', '3', 'A'},
{'4', '5', '6', 'B'},
{'7', '8', '9', 'C'},
{'*', '0', '#', 'D'}
};
byte rowPins[ROWS] = {A0, A1, A2, A3}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {A4, A5, 3, 2}; //connect to the column pinouts of the keypad
//initialize an instance of class NewKeypad
Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS);
int led;
int buzzer = 10;
int m11;
int m12;
void setup()
{
Serial.begin(9600);
pinMode(11, OUTPUT);

lcd.begin(16, 2);
pinMode(led, OUTPUT);
pinMode(buzzer, OUTPUT);
pinMode(m11, OUTPUT);
pinMode(m12, OUTPUT);
lcd.print(" Electronic ");
Serial.print(" Electronic ");
lcd.setCursor(0, 1);
lcd.print(" Keypad Lock ");
Serial.print(" Keypad Lock ");
delay(2000);
lcd.clear();
lcd.print("Enter Ur Passkey:");
Serial.println("Enter Ur Passkey:");
lcd.setCursor(0, 1);
for (int j = 0; j < 4; j++)
EEPROM.write(j, j + 49);
for (int j = 0; j < 4; j++)
pass[j] = EEPROM.read(j);
}

void loop()
{
digitalWrite(11, HIGH);
customKey = customKeypad.getKey();
if (customKey == '#')
change();
if (customKey)
{
password[i++] = customKey;
lcd.print(customKey);
Serial.print(customKey);
beep();
}
if (i == 4)
{
delay(200);
for (int j = 0; j < 4; j++)
pass[j] = EEPROM.read(j);
if (!(strncmp(password, pass, 4)))
{
digitalWrite(led, HIGH);
beep();
lcd.clear();
lcd.print("Passkey Accepted");
Serial.println("Passkey Accepted");
digitalWrite(11, LOW);
delay(2000);
lcd.setCursor(0, 1);
lcd.print("#.Change Passkey");
Serial.println("#.Change Passkey");
delay(2000);
lcd.clear();
lcd.print("Enter Passkey:");
Serial.println("Enter Passkey:");
lcd.setCursor(0, 1);
i = 0;
digitalWrite(led, LOW);
}
else
{
digitalWrite(11, HIGH);
digitalWrite(buzzer, HIGH);
lcd.clear();
lcd.print("Access Denied...");
Serial.println("Access Denied...");
lcd.setCursor(0, 1);
lcd.print("#.Change Passkey");
Serial.println("#.Change Passkey");
delay(2000);
lcd.clear();
lcd.print("Enter Passkey:");
Serial.println("Enter Passkey:");
lcd.setCursor(0, 1);
i = 0;
digitalWrite(buzzer, LOW);
}
}
}
void change()
{
int j = 0;
lcd.clear();
lcd.print("UR Current Passk");
Serial.println("UR Current Passk");
lcd.setCursor(0, 1);
while (j < 4)
{
char key = customKeypad.getKey();
if (key)
{
pass1[j++] = key;
lcd.print(key);
Serial.print(key);
beep();
}
key = 0;
}
delay(500);

if ((strncmp(pass1, pass, 4)))
{
lcd.clear();
lcd.print("Wrong Passkey...");
Serial.println("Wrong Passkey...");
lcd.setCursor(0, 1);
lcd.print("Better Luck Again");
Serial.println("Better Luck Again");
delay(1000);
}
else
{
j = 0;
lcd.clear();
lcd.print("Enter New Passk:");
Serial.println("Enter New Passk:");
lcd.setCursor(0, 1);
while (j < 4)
{
char key = customKeypad.getKey();
if (key)
{
pass[j] = key;
lcd.print(key);
Serial.print(key);
EEPROM.write(j, key);
j++;
beep();
}
}
lcd.print(" Done......");
Serial.println(" Done......");
delay(1000);
}
lcd.clear();
lcd.print("Enter Ur Passk:");
Serial.println("Enter Ur Passk:");
lcd.setCursor(0, 1);
customKey = 0;
}
void beep()
{
digitalWrite(buzzer, HIGH);
delay(20);
digitalWrite(buzzer, LOW);
}

dglnk,

Generally folks here are glad to help with school projects, but you should start a new thread that just focusses on your project. It was GREAT that you posted your code, but there is a better way to do that. Please read the "asking-for-help" guidelines in the thread called "How to use this forum - please read.". That way your project will attract the best, and most encouraging help.

Good luck, and welcome to the forum!

I keep getting compile error (exit 1).

There is almost certainly more to the error message than that

When I compile it for a Uno using IDE 1.5.6-r2 on Windows 7 the only message that I get is

Sketch uses 6,822 bytes (21%) of program storage space. Maximum is 32,256 bytes.
Global variables use 596 bytes (29%) of dynamic memory, leaving 1,452 bytes for local variables. Maximum is 2,048 bytes.

in other words, no error

econjack:
use Ctrl-T in the IDE to reformat your code into a standard style.

Thanks. It really helped me in another code thought.

look i have the same proplem can someone please help me?

//Use pushbotton as a toggle switch.

//When the pushbotton is pressed, the pushbotton pin reads a
//high voltage and then a low voltage, and then ledOn is set
//to the opposite of its current value (either false or true).

//Based on Starter Kit Project 02.
#include "pitches.h"

const int piezoPin = 12; //piezo
const int rPin = 5; //red LED
const int gPin = 4; //green LED
const int bPin = 3; //blue LED
const int pPin = 2; //pushbutton

int ledState = 0;
int ledOn = false;

// notes
int melody[] = {
NOTE_F5,NOTE_D5,NOTE_AS4,NOTE_D5,NOTE_F5,NOTE_AS5,NOTE_D6,NOTE_C6,NOTE_AS5,NOTE_D5,NOTE_E5,NOTE_F5,
NOTE_F5,NOTE_F5,NOTE_D6,NOTE_C6,NOTE_AS5,NOTE_A5,NOTE_G5,NOTE_A5,NOTE_AS5,NOTE_AS5,NOTE_F5,NOTE_D5,NOTE_AS4,
NOTE_D6,NOTE_D6,NOTE_D6,NOTE_DS6,NOTE_F6,NOTE_F6,NOTE_DS6,NOTE_D6,NOTE_C6,NOTE_D6,NOTE_DS6,NOTE_DS6,
0,NOTE_DS6,NOTE_D6,NOTE_C6,NOTE_AS5,NOTE_A5,NOTE_G5,NOTE_A5,NOTE_AS5,NOTE_D5,NOTE_E5,NOTE_F5,
NOTE_F5,NOTE_AS5,NOTE_AS5,NOTE_AS5,NOTE_A5,NOTE_G5,NOTE_G5,NOTE_G5,NOTE_C6,NOTE_DS6,NOTE_D6,NOTE_C6,NOTE_AS5,NOTE_AS5,NOTE_A5,
NOTE_F5,NOTE_F5,NOTE_AS5,NOTE_C6,NOTE_D6,NOTE_DS6,NOTE_F6,NOTE_AS5,NOTE_C6,NOTE_D6,NOTE_DS6,NOTE_C6,NOTE_AS5
};

// durations: 2 = half note, and 8/3,4,6,8,12. It appears that 8/2.9 is more accurate than 8/3.
float noteDurations[] = {
6,12,4,4,4,2,6,12,4,4,4,2,
8,8,8/2.9,8,4,2,8,8,4,4,4,4,4,
6,12,4,4,4,2,8,8,4,4,4,2,
8,8,8/2.9,8,4,2,8,8,4,4,4,2,
4,4,4,8,8,4,4,4,4,8,8,8,8,4,4,
8,8,8/2.9,8,8,8,2,8,8,4,4,4,2
};

// calculates the number of elements in the melody array.
int musicLength=sizeof(melody)/sizeof('NOTE_F5');

void setup() {
pinMode(pPin, INPUT);
pinMode(rPin, OUTPUT);
pinMode(gPin, OUTPUT);
pinMode(bPin, OUTPUT);
}

void loop() {
int pPinState=digitalRead(pPin);
if(pPinState==HIGH) {
ledState = 1;
}
if (pPinState==LOW and ledState ==1) {
ledState = 2;
ledOn = not ledOn;
}
if (ledOn && pPinState!=HIGH) {
for (int thisNote = 0; thisNote < musicLength; thisNote++) {
// blink the three LEDs in sequence
if (thisNote%3==0){
digitalWrite(rPin, HIGH);
digitalWrite(gPin, LOW);
digitalWrite(bPin, LOW);
}
else if (thisNote%3==1){
digitalWrite(rPin, LOW);
digitalWrite(gPin, HIGH);
digitalWrite(bPin, LOW);
}
else if (thisNote%3==2){
digitalWrite(rPin, LOW);
digitalWrite(gPin, LOW);
digitalWrite(bPin, HIGH);
}

// calculate the note duration. change tempo by changing 2000 to other values
int noteDuration = 2000/noteDurations[thisNote];
tone(piezoPin, melody[thisNote],noteDuration);

// to distinguish the notes, set a minimum time between them.
// the note's duration + 30% seems to work well
float pauseBetweenNotes = noteDuration * 1.30;

//split the delay into two parts and check to see
//whether the pushbutton is pressed to turn off
//the sound and light
delay(pauseBetweenNotes/2);
if(digitalRead(pPin)==HIGH) {
break;
}
delay(pauseBetweenNotes/2);
if(digitalRead(pPin)==HIGH) {
break;
}
}
}
else if (not ledOn) {
digitalWrite(rPin, LOW);
digitalWrite(gPin, LOW);
digitalWrite(bPin, LOW);
}
}

look i have the same proplem can someone please help me?

What problem would that be ?

UKHeliBob:
What problem would that be ?

One of his problems is that he didn't read the earlier post that asks posters to read Nick Gammon's How To Use This Site post at the top of the Forum, or using code tags to post their code.

I don't know of a help for that problem though.

Doesn't that same post say to start yer own thread, rather than just hijack one (especially if it says "solved", cause then nobody will read it.)