Error compiling for board Arduino/Genuino Uno.

Hi i am very new to arduino and i am trying to write a code of a temperature controlled fridge so that i can adjust a pot and the temp in the fridge changes with the lowest setting as -15 and the highest setting as 30degrees. as the the temp drops below the input from the pot im trying to make the compressor turn on and a light to show the compressor is on. i am very new at this and im still not quite sure what im doing. the error below keeps popping up and im not quite sure whats wrong with my code. im hoping that i was on a close path to how i should have done it, but any help with how to fix this error would be very much appreciated.

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

C:\Users\Admin\AppData\Local\Temp\ccFcxDPC.ltrans0.ltrans.o:(.rodata+0x6): undefined reference to `Print::write(unsigned char const*, unsigned int)'

c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr5/crtatmega328p.o:(.init9+0x0): undefined reference to `main'

collect2.exe: error: ld returned 1 exit status

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.

//
const int tempPin=A0;
const int potPin=A1;
int potValue;
int settemp;
int compressor=13;
int light=12;
void setup() {
 // put your setup code here, to run once:
Serial.begin(9600);
pinMode (tempPin,INPUT);
pinMode (potPin,INPUT);
pinMode (compressor,OUTPUT);
pinMode (light,OUTPUT);
}

void loop() {
 // put your main code here, to run repeatedly:
int tempValue= analogRead(tempPin);
float voltage=(tempValue/1024.0)*5.0;
Serial.print (",degrees C:");
float temperature=(voltage-0.5)*100;
Serial.println(temperature);
potValue=analogRead(potPin);
settemp=map(potValue,0,1023,-15,30);
Serial.print("Set Temp:");
Serial.print(settemp);
if (temperature>settemp){
 digitalWrite(compressor,HIGH);
 digitalWrite(light,HIGH);
}
delay(200);
}]

[code][/code]

It looks like there is nothing about your code that would produce the error. Can you compile the example sketches such as Blink ?

Please use code tags (</> button on the toolbar) when you post code or warning/error messages. The reason is that the forum software can interpret parts of your code as markup, leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier to read your code and to copy it to the IDE or editor. If your browser doesn’t show the posting toolbar then you can just manually add the code tags:
[code]``[color=blue]// your code is here[/color]``[/code]
Using code tags and other important information is explained in the How to use this forum post. Please read it.

Please always do a Tools > Auto Format on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read. If you’re using the Arduino Web Editor you will not have access to this useful tool but it’s still unacceptable to post poorly formatted code. I recommend you to use the standard IDE instead.

Try exiting all Arduino IDE windows and then restart the IDE to clear the cache. Maybe that will fix the problem.

I see the same problem.

Even the Simple Blink example :

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

C:\Users\Admin\AppData\Local\Temp\ccFcxDPC.ltrans0.ltrans.o:(.rodata+0x6): undefined reference to `Print::write(unsigned char const*, unsigned int)'

c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr5/crtatmega328p.o:(.init9+0x0): undefined reference to `main'

collect2.exe: error: ld returned 1 exit status

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

-

OK - Restart the IDE - Cache problem

jlsilicon:
Does anybody have a Useful Solution ??

Did you try what I recommended:

pert:
Try exiting all Arduino IDE windows and then restart the IDE to clear the cache. Maybe that will fix the problem.

Also, you forgot to do this:

pert:
Please use code tags (</> button on the toolbar) when you post code or warning/error messages.

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

Error compiling for board Arduino/Genuino Uno.

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

hanbaly:
Arduino: 1.8.3 (Windows 10), Board: “Arduino/Genuino Uno”

Error compiling for board Arduino/Genuino Uno.

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

Update to Arduino IDE 1.8.7, which you can download from: