Hi,
I'm suddenly having problems compiling sketches in arduino IDE 1.6.6. This happens no matter what sketch I try to compile and/or upload, do this post contains a simple read and print from a potentiometer (shown below).
I tried installing the IDE all over again, but the same message keeps appearing.
I have tried connecting both arduino UNO and Leonardo, but still no success.
Does anyone know how to fix this?
The error message and code is as follows:
Error message:
C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware "C:\Program Files (x86)\Arduino\hardware" -hardware "C:\Users\Erik Karlsson\AppData\Local\Arduino15\packages" -tools "C:\Program Files (x86)\Arduino\tools-builder" -tools "C:\Program Files (x86)\Arduino\hardware\tools\avr" -tools "C:\Users\Erik Karlsson\AppData\Local\Arduino15\packages" -built-in-libraries "C:\Program Files (x86)\Arduino\libraries" -libraries "C:\Users\Erik Karlsson\Documents\Arduino\libraries" -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10606 -build-path "C:\Users\ERIKKA~1\AppData\Local\Temp\build9de2fa4457d497e19d26c984c9306df4.tmp" -warnings=all -prefs=build.warn_data_percentage=75 -verbose "C:\Users\Erik Karlsson\Documents\Arduino\sketch_apr05a\sketch_apr05a.ino"
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware "C:\Program Files (x86)\Arduino\hardware" -hardware "C:\Users\Erik Karlsson\AppData\Local\Arduino15\packages" -tools "C:\Program Files (x86)\Arduino\tools-builder" -tools "C:\Program Files (x86)\Arduino\hardware\tools\avr" -tools "C:\Users\Erik Karlsson\AppData\Local\Arduino15\packages" -built-in-libraries "C:\Program Files (x86)\Arduino\libraries" -libraries "C:\Users\Erik Karlsson\Documents\Arduino\libraries" -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10606 -build-path "C:\Users\ERIKKA~1\AppData\Local\Temp\build9de2fa4457d497e19d26c984c9306df4.tmp" -warnings=all -prefs=build.warn_data_percentage=75 -verbose "C:\Users\Erik Karlsson\Documents\Arduino\sketch_apr05a\sketch_apr05a.ino"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -M -MG -MP -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\Erik Karlsson\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.10\cores\arduino" "-IC:\Users\Erik Karlsson\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.10\variants\standard" "C:\Users\ERIKKA~1\AppData\Local\Temp\build9de2fa4457d497e19d26c984c9306df4.tmp\sketch\sketch_apr05a.ino.cpp"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -M -MG -MP -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\Erik Karlsson\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.10\cores\arduino" "-IC:\Users\Erik Karlsson\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.10\variants\standard" "C:\Users\ERIKKA~1\AppData\Local\Temp\build9de2fa4457d497e19d26c984c9306df4.tmp\sketch\sketch_apr05a.ino.cpp"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -M -MG -MP -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\Erik Karlsson\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.10\cores\arduino" "-IC:\Users\Erik Karlsson\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.10\variants\standard" "C:\Users\ERIKKA~1\AppData\Local\Temp\build9de2fa4457d497e19d26c984c9306df4.tmp\sketch\sketch_apr05a.ino.cpp"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -M -MG -MP -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\Erik Karlsson\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.10\cores\arduino" "-IC:\Users\Erik Karlsson\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.10\variants\standard" "C:\Users\ERIKKA~1\AppData\Local\Temp\build9de2fa4457d497e19d26c984c9306df4.tmp\sketch\sketch_apr05a.ino.cpp"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -M -MG -MP -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\Erik Karlsson\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.10\cores\arduino" "-IC:\Users\Erik Karlsson\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.10\variants\standard" "C:\Users\ERIKKA~1\AppData\Local\Temp\build9de2fa4457d497e19d26c984c9306df4.tmp\sketch\sketch_apr05a.ino.cpp"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\Erik Karlsson\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.10\cores\arduino" "-IC:\Users\Erik Karlsson\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.10\variants\standard" "C:\Users\ERIKKA~1\AppData\Local\Temp\build9de2fa4457d497e19d26c984c9306df4.tmp\sketch\sketch_apr05a.ino.cpp" -o ""
avr-g++: error: missing filename after '-o'
exit status 1
Error compiling.
Code:
const int potPin = A0;
int potRead = 0;
void setup() {
Serial.begin(9600);
pinMode(potPin, INPUT);
}
void loop() {
potRead = analogRead(potPin);
Serial.println(potRead);
delay(500);
}
Help is very much appreciated!