Missing libraries for example code

I've installed the arduino IDE on my linux machine using apt-get, so I expect all the dependencies to be met, but when I try to compile the example code for the Blink sketch every function and constant used in the sketch is declared to be out of scope. So, there should be a declaration of these constants and "built in" functions somewhere that is missing. All the documentation I read fails to indicate where they are located or what I should do to make them "visible" to the example code. In fact most of the documentation gives no indication that I should even be having this problem! So, where are the built in functions and constants defined, and how do I get them into the scope of the example sketches. At this point non of the example sketches will compile because of this scope problem. Any pointers appreciated.

I haven’t tried it on Linux personally, but I would go to this page and download the suggested .tgz file:

I installed Arduino 22 and 1.0 on some Ubuntu machines (from 10.4 to 11.10, 32 and 64 bit systems). The only thing I installed from the repos were the gcc toolchain for avr cross-compilation (don't remember the exact packages now but selecting something like gcc-avr and avr-libc should pull in the right dependencies). Just download the right version of Arduino for your system, unpack and launch the "arduino" script. Easy like that :-)

I did basically that. Following the instructions under Ubuntu on the arduino site, did the apt-get install line including avr-gcc, the libs, arduino-core and arduino. Set up my card without problems using the instructions provided. Open the Blink script, click verify. First error message: 'OUTPUT' was not declared in this scope

Other errors covered every function and constant in the sketch. The Getting Started with Arduino book says they are builtin constants and functions.

Built in where?

"OUTPUT" doesn't sound to me like something coming from the Arduino libraries, core or otherwise.

Please post the exact code that doesn't compile, and the exact error messages you get.

What about

  pinMode(13, OUTPUT);

from the Blink example?

Nick: When I unpack the tar ball on the desktop and run that IDE everything works! Don't see anything different in the library folder, so I'm not sure what's going on except that the tar ball is 1.0 and the package installed IDE is 0022

Tuxduino: The sketch is the example Blink sketch provided with the IDE. The error messages are all the same as the OUTPUT one I quoted but with the word OUTPUT replaced with HIGH, LOW, pinmode, digitalwrite, and delay (ie every constant and function in the sketch)

Must be an 0022 bug. Looks like I'll stick with the 1.0 tarball

Thanks Nick!

Ops… sounds like I really need some sleep :roll_eyes:

(edit: I always use 1.0 from arduino.cc, but I also have arduino 0022ubuntu0.1 from the repo, the Blink example compiles just fine with the latter… Anyway glad the 1.0 tarball works for you too :slight_smile: