avr-g++: error: missing filename after '-o'

IDE Bug???
any idea?

win 7 / pro mini
using:
#include <IRremote.h>
#include <Wire.h>
#include "RTClib.h"

avr-g++: error: missing filename after '-o'

exit status 1
Error compiling.

I'd need to know:

  • which version of the Arduino IDE you're using
  • which board you have selected in Tools > Board
  • which version of that boards package you have installed(shown in Tools > Board > Boards Manager)

My guess is that you are using Arduino IDE 1.6.6 and have one of the Arduino AVR Boards selected and are using the Arduino AVR Boards version 1.6.10 which is incompatible with Arduino IDE 1.6.6 so your options are:

win 7 / pro mini
using:
#include <IRremote.h>
#include <Wire.h>
#include "RTClib.h"

avr-g++: error: missing filename after '-o'

exit status 1
Error compiling.

pert:

  • which version of that boards package you have installed(shown in Tools > Board > Boards Manager)

You forgot to tell me which version of Arduino AVR Boards you are using. To find this look at Tools > Board > Boards Manager...

pert:
I'd need to know:

  • which version of the Arduino IDE you're using

You didn't answer this question either. How do you expect me to try to help you if you won't even bother to provide the minimum amounts of information needed?

Done! 1.6.5 works for me
win 7. ard pro mini (& uno)

//... sorry & Thnaks, but i have wrote earlier "win7 / pro nimi", thought it will be enought //

Done! 1.6.5 works for me
win 7. ard pro mini (& uno)

As Pert said, problem is an upgrade of Arduino AVR Boards to version 1.6.10. To solve it, you must:

  • access Tools > Board > Boards Manager
  • click on Arduino AVR Boards (which should show version 1.6.10)
  • Select version 1.6.6 and click on Install

After this downgrade it compiles back again.

Regards

XiR_:
Select version 1.6.6 and click on Install

You don't need to go all the way back to Arduino AVR Boards 1.6.6. 1.6.9 is fine or 1.6.8 if that one gives you problems.

XiR_:
As Pert said, problem is an upgrade of Arduino AVR Boards to version 1.6.10. To solve it, you must:

  • access Tools > Board > Boards Manager
  • click on Arduino AVR Boards (which should show version 1.6.10)
  • Select version 1.6.6 and click on Install

After this downgrade it compiles back again.

Indeed it does!

OK, OK, so the IDE is broken.

Not very helpful overall.

Why is this warning not included on the "download" page?

Paul__B:
OK, OK, so the IDE is broken.

I'm not sure I would say broken, it's just that the newer versions of Arduino AVR Boards core is not backwards compatible with IDE 1.6.6.

I did manage to find a workaround that would make Arduino AVR Boards 1.6.10 and greater compatible with Arduino IDE 1.6.6 and added it to a couple of 3rd party cores but it's a bit of a hack so I haven't felt confident enough about it to submit a pull request to Arduino. I did get a PR merged that provides backwards compatibility for IDE 1.6.5 and previous but it doesn't solve the IDE 1.6.6 issue.

Paul__B:
Why is this warning not included on the "download" page?

The real solution would be for Boards Manager to do IDE dependency checking(Specify IDE version dependency of platform in package index · Issue #1244 · arduino/arduino-cli · GitHub). As time goes on and the IDE progresses it's impossible for complete backwards compatibility to be maintained without putting severe limitations on innovation. The key is for Boards Manager to be smart enough not to allow people to upgrade their cores to a version that will break the IDE. This should have been done from the very start but doesn't seem to be a priority for the developers.

Im on 1.6.6 and I have avr 1.6.14, upgraded it last night by mistake and now ive got this same error.

How do I downgrade to boards manager 1.6.9 (which I think i had)?

Marciokoko:
How do I downgrade to boards manager 1.6.9 (which I think i had)?

It's not boards manager 1.6.9, it's Arduino AVR Boards 1.6.9. I would recommend upgrading to a newer IDE version instead. Arduino IDE 1.6.6 had lots of problems. Arduino IDE 1.6.9, 1.6.11 and 1.6.12 are pretty good. They all have their issues but none so much as 1.6.6 and they will allow you to use the latest Arduino AVR Boards, 1.6.14.

If you do want to keep using Arduino IDE 1.6.6, do this:

  • Tools > Boards > Boards Manager.
  • Wait for downloads to complete.
  • Click on Arduino AVR Boards.
  • Select 1.6.9 from the "Select version" drop down menu.
  • Click the "Install" button.
  • Wait for installation to complete.
  • Click the "Close" button.

"avr-g++: error: missing filename after '-o'"

I'm getting this same error, but not using the Arduino AVR boards. I'm using Arduino 1.6.6 dev environment on a Windows 7 Professional machine and am trying to program a Pro-Micro using "Sparkfun AVR boards 1.1.9".

Any thoughts on what I need to do here? Any tips are greatly appreciated.

Why are you using Arduino IDE 1.6.6? That was one of the worst versions ever and is now over 3 years out of date. Upgrade to a recent IDE version and the problem will be solved.

I have no good excuse for using 1.6.6. It's just the one I've been using and had no cause to update until now.

So now I've installed Arduino 1.8.5, and I have a different problem... It no longer recognizes the intrinsic class "keyboard" for the Arduino pro-micro. I'm using "Sparkfun AVR board 1.1.9".

Any thoughts?

Thanks again.

Add this line to your sketch:

#include <Keyboard.h>

D'OH! My bad. Turns out I needed to include <Keyboard.h>. It's working now. Thanks again.

To make it worse I now see that you answered this before I found it myself. In any case, thanks so much!