hello world program failing on arduino uno using ide 1.0.5

Hi there. I'm trying to write my first C++ app, as well as my first arduino sketch.
I have the following code:

void setup()
{
Serial.begin(9600);
}

void loop()
{
Serial.println("Hello, world!");
delay(1000);
}

When i try to verify it, it bombs with the following error message:
/home/jj/Documents/arduino-1.0.5/hardware/tools/avr/bin/avr-g++: line 3: /home/jj/Documents/arduino-1.0.5/hardware/tools/avr/bin/../bin.gcc/avr-g++: cannot execute binary file
/home/jj/Documents/arduino-1.0.5/hardware/tools/avr/bin/avr-g++: line 3: /home/jj/Documents/arduino-1.0.5/hardware/tools/avr/bin/../bin.gcc/avr-g++: Success
/home/jj/Documents/arduino-1.0.5/hardware/tools/avr/bin/avr-g++ returned 126

It's a little confusing because it says "Error Compiling" in the window, and then it shows me the above output... but as you can see, the second set of mesages ends with Success...
To test whether it was actually working or not, I uploaded the code to the arduino anyways.... launched the Serial Monitor and after waiting a little, I see the following garbled output:
e²0?²?°?"?
(on my screen it includes a bunch of squares etc.)
I'm not sure what I'm doing wrong! I'm running the IDE on ubuntu 12...
Thanks.

Hi, have you told the IDE what board you are going to program?
In TOOLs BOARD check the UNO board and see if that makes a difference.

Tom… :slight_smile:

Yep. I've specified the right board and I was also able to get it to detect the port. I've selected the port and also UNO for the board type.
I found this post:

http://www.raspberrypi.org/phpBB3/viewtopic.php?f=37&t=18183

I renamed the folder and it compiles ... but then when I go to upload the sketch, i get the following error:
Binary sketch size: 1,672 bytes (of a 32,256 byte maximum)
/home/jj/Documents/arduino-1.0.5/hardware/tools/avrdude: 1: /home/jj/Documents/arduino-1.0.5/hardware/tools/avrdude: ELF: not found
/home/jj/Documents/arduino-1.0.5/hardware/tools/avrdude: 2: /home/jj/Documents/arduino-1.0.5/hardware/tools/avrdude: Syntax error: "(" unexpected

Any suggestions?

Any suggestions?

You don't appear to be using Windows. I have to wonder what OS you are using. It does NOT appear to be a Programming issue, so why did you post here?

I am not running windows, I clearly stated that in my original post. I've double checked and it doesn't appear that this forum is strictly for windows programming. Perhaps I've missed something?
As far as it not being a programming issue... it's giving me a syntax error. So... I assumed it is related to sketch code ...

If I'm not supposed to be posting here, I apologize. But please kindly tell me where I am supposed to post my question? I'm a newbie to arduino and c++, and linux for that matter. So I apologize for any remedial mistakes or questions. But your comment is a little vague and not very helpful at all.

I've double checked and it doesn't appear that this forum is strictly for windows programming. Perhaps I've missed something?

You are correct. I never meant to imply that it was strictly for users of the Windows operating system.

Your problem, though, appears to be more of an Installation and Troubleshooting problem, related to your OS, than it does a programming issue. You aren't having trouble compiling just that one sketch, are you?

Paul, I tried some the samples and they are failing too.
So ... I'm going to try to uninstall all libraries / packages related to the IDE and retry.
I will repost if I still have issues in another forum.

thanks.

and so it wasn’t a programming issue after all…
I uninstalled everything related to the IDE… and then used the software center baked into ubuntu to reinstall.
Then i tried a sample program as well as my own.
All is well.

Sorry for the noise.

Sorry for the noise.

No problem. Thanks for the followup.