Will only compile for arduino mega

I was hoping to use a nano for my project however i receive the error message

"collect2.exe: error: ld returned 5 exit status

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

if i try and compile my program on any other board. There are also some strange things i have noticed… i receive that same error message if i delete some of the Serial.println commands. Is there any way to gain a better understanding of what went wrong when i receive this error message because it seems to happen alot?

My program is fairly short so i will post the code. i apologizeto bother you all with this but it is difficult to learn how to code correctly and efficiently when you only have google and youtube to teach you!

Thank you all in advance

#include <SoftwareSerial.h>
#include “Arduino.h”
#include<SPI.h>
#include<RF24.h>

RF24 radio(7,8);
byte addresses[6] = {“1Node”,“2Node”};
int data[6];

volatile unsigned long lastMPHflag = 0; //Speedometer varibles
volatile unsigned long speedometer = 0;
volatile float wheelC = 263;
const byte speedIn = 2;

volatile unsigned long lastPulseTime = 0; //Tachometer varibles
volatile unsigned long rpm = 0;
const byte tachIn = 3;

int Lblink = A1; //Light varibles
int Rblink = A2;
int Neutral = A3;
int LowFuel = A4;

void setup()
{
Serial.begin(9600);
Serial.println(“RECIEVER MODULE”);
radio.begin();
radio.setPALevel(RF24_PA_HIGH);
radio.setDataRate(RF24_2MBPS);
radio.setChannel(124);
radio.openWritingPipe(addresses[0]);
radio.openReadingPipe(1,addresses[1]);
radio.startListening();

pinMode(Lblink, INPUT);
pinMode(Rblink, INPUT);
pinMode(Neutral, INPUT);
pinMode(LowFuel, INPUT);

attachInterrupt(digitalPinToInterrupt(speedIn),getSpeed, RISING);
attachInterrupt(digitalPinToInterrupt(tachIn),getTach,RISING);
}

/* void Recieve() RECIEVE not needed
{
while(radio.available())
{
radio.read(&data, sizeof(data));
}
} */

void getTach()
{
unsigned long now = micros();
unsigned long interval = now - lastPulseTime;
if(interval > 5000) // may need to remove this?
{
rpm = 60000000UL/interval;
lastPulseTime = now;
//rpmInt = round(rpm);
}
}

void getSpeed()
{
int MPHflag = millis();
int MPHint = MPHflag - lastMPHflag;
lastMPHflag = MPHflag;
speedometer = (wheelC/MPHint)*22.369;
}

void Transmit()
{
radio.stopListening();
radio.write(&data, sizeof(data));
radio.startListening();
Serial.print("Sent response ");
Serial.println(data[0]);
}

void loop()
{
data[2] = 0;
data[3] = 0;
data[4] = 0;

if(radio.available()) // recieved varible = data
{ // modify data varible then it is sent back in transmit function
data[0] = speedometer;
data[1] = rpm;

if(Lblink == HIGH) data[2] = 1;
if(Rblink == HIGH) data[2] = 2;
if(Neutral == HIGH) data[3] = 1;
if(LowFuel == HIGH) data[4] = 1;
//Transmit();
Serial.println(data[1]);
}
}

Are you running 1.8.2 or earlier, installed through the windows store on Windows 10, or on Windows XP? Under those configurations, there are unpredictable linking failures. This issue was finally fixed in 1.8.3.

Thank you! yes i am using 1.8.0, downloading 1.8.3 now, i have an old laptop with windows XP.. ive researched and seen a little about replacing a "ld" file but when i do that nothing seems to compile. so i take it collect2.exe: error: ld returned 5 exit status is not a normal error code? im new to coding to i always thought i was doing something wrong not having a compatibility issue

Thank you so much!!! it worked!