Pages: [1]   Go Down
Author Topic: Compiling Errors on Uno  (Read 2045 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 smiley-red I have a new Uno board, running Mac OSX 10.7.4 (Lion) on a Mac Mini. Everything seems to connect, but it starts to upload then gets 'undefined reference to setup' and undefined reference to loop' compiling error message. Tried it on another Mac running Leopard, same messages. Tried it on PC running Windows XP- dittoGet green light and blinking yellow and it starts to load, so it doesn't appear to be a connection problem per se. HELP!
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 205
Posts: 12840
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


What are you trying to upload?  Something you've written?  One of the examples?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just trying to upload the initial sketch to run a robot.
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 205
Posts: 12840
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Too terse.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry. Like my username, it's all new to me. I built the Popular Mechanics 'Build You're First Robot'. The Arduino Uno is the suggested board. Robot is done but the initial upload for the Uno gets the errors mentioned, so it has never loaded a sketch. Tried all the suggestions in troubleshooting. It seems to physically connect OK but it starts to compile,then about halfway through, it stops with the error message.
core.a(main.cpp.o): In function `main':
/Users/bobserver/Desktop/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/main.cpp:11: undefined reference to `setup'
/Users/bobserver/Desktop/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/main.cpp:14: undefined reference to `loop




Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 205
Posts: 12840
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Like my username, it's all new to me.

I know.   smiley-wink

A sketch must have two functions... setup and loop.  In other words, this is the smallest possible sketch that can be uploaded (you may want to try uploading it)...

Code:
void setup( void )
{
}

void loop( void )
{
}

The sketch you are trying to upload does not have either of those functions.

Quote
I built the Popular Mechanics 'Build You're First Robot'.

This?
http://www.popularmechanics.com/technology/engineering/robots/build-your-first-robot

Is this the sketch you are trying to upload?
http://www.robotoid.com/byfr/popmech_robot_10.zip

If not, what sketch are you trying to upload?  (please wrap code in [code] [/code] tags)
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes that is the Popular Mechanics project I built. The sketch is from the Arduino site for Mac OSX that is supposed to have basic functions. Doesn't appear to be the same as the one you sent. (Which reports errors also).
Quote






Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 205
Posts: 12840
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The sketch is from the Arduino site for Mac OSX that is supposed to have basic functions.

Link?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


http://arduino.cc/en/Main/Software

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I told you I wasn't too bright. I found out where to add the commands for the sketch. It works! Thanks for your help. Guys like me need all the help we can get and then some. 

Thanks again.
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 205
Posts: 12840
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


I'm glad you have it working.
Logged

Pages: [1]   Go Up
Jump to: