I'm trying to draw a line in my scene, but when I call drawLine(), I get a build error. Here's my draw() method:
- (void) draw
{
glColor4f(1.0, 0.0, 0.0, 1.0);
glLineWidth(1.0f);
drawLine(CGPointMake(0, 0), CGPointMake(100, 100));
}
And here's the error I'm getting:
cd /Users/jbuhler/Sites/SonyMusic/Icarus
setenv IPHONEOS_DEPLOYMENT_TARGET 3.0
setenv MACOSX_DEPLOYMENT_TARGET 10.5
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk -L/*****/build/Debug-iphoneos -F*****/build/Debug-iphoneos -filelist /*****/build/Icarus.build/Debug-iphoneos/SingWithMe.build/Objects-normal/armv6/*****.LinkFileList -mmacosx-version-min=10.5 -Wl,-dead_strip -miphoneos-version-min=3.0 -framework Foundation -framework UIKit -framework CoreGraphics -framework MediaPlayer -framework AudioToolbox -framework OpenGLES -framework QuartzCore -framework SystemConfiguration -framework CoreLocation -o /*****/build/Debug-iphoneos/*****.app/*****
Undefined symbols:
"drawLine(CGPoint, CGPoint)", referenced from:
-[GamePlayScene draw] in GamePlayScene.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
(***** is where I've stripped out the client's name and/or project name.)
I'm using Cocos2d 0.8.0 RC2.
Any ideas what I'm doing wrong here?