arduino-0018 from linux command-line

So, I threw arduino-0018 on my linux box to develop from there instead. I looked around and found details as to how to get it to work from the command line, mainly editing the makefile and getting the board to reset before uploading.. got it working. An empty sketch works. Heck, even a sketch that's not empty works. But, for some reason, if I use certain functions (in this case, attachInterrupt()), I get an error.

void setup() {
  pinMode(2, INPUT);
  pinMode(3, INPUT);

  digitalWrite(2, HIGH);
  digitalWrite(3, HIGH);

  attachInterrupt(0, pinChange2, CHANGE);
  attachInterrupt(1, pinChange3, CHANGE);

And when I try to compile it... (yes there's a loop() function in there as well)

[code] ashley@shuttle:~/foo$ make /usr/bin/avr-gcc -mmcu=atmega328p -I. -gstabs -DF_CPU=16000000 -I/home/ashley/arduino-0018/hardware/arduino/cores/arduino -Os -Wall -std=gnu99  -o applet/foo.elf applet/foo.cpp -L. applet/core.a -lm cc1plus: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++ /tmp/ccauvGtv.o: In function setup': applet/foo.cpp:18: undefined reference toattachInterrupt' applet/foo.cpp:19: undefined reference to `attachInterrupt' make: *** [applet/foo.elf] Error 1 ashley@shuttle:~/foo$ [/code]

I grep'd on the folder with the header files -

ashley@shuttle:~/arduino-0018/hardware/arduino/cores/arduino$ grep attach *
WInterrupts.c:void attachInterrupt(uint8_t interruptNum, void (*userFunc)(void), int mode) {
WInterrupts.c:void attachInterruptTwi(void (*userFunc)(void) ) {
wiring.h:void attachInterrupt(uint8_t, void (*)(void), int mode);

So I'm stumped. It must be indexing the header files properly if SOME stuff works, such as Serial.begin(9600).. but not wiring.h? Confusion ensues. Help?