I am new to the PalmPilot programming world, but not to programming C. below
is the VERY basic code I have written for the PilotMain() function which the
compiler doesnt like:
#include <PalmOS.h>
static int StartApplication(void){ return 0; }
static void EventLoop(void){}
static void StopApplication(void){}
DWord PilotMain(Word cmd, Ptr cmdPBP, Word launchFlags)
{
int error;
if (cmd == sysAppLaunchCmdNormalLaunch)
{
error = StartApplication(); // Application start code
if(error)
return error;
EventLoop(); // Event loop
StopApplication(); // Application stop code
}
return 0;
}
The compiler returns
test.c:7: parse error before 'PilotMain'
test.c:7: Parse error before 'cmd'
test.c:8: confliction types for 'PilotMain'
plus a few other errors wich are probably being caused the the first one. Is
DWord still a valid return type for PilotMain()?
I am using the gcc compiler version 2.95.2-kgpd from the PRC-Tools package
along with the sdk 3.5 libraries. When compiling i use the -palmos3.5 flag.
The tutorial I am using to aid in palm programming is a few years old (GNU
Pilot SDK Tutorial by Andrew Howlett). Has there been a change to the
PilotMain() function since the new sdk change? There isnt much to the small
bit of code and I cant see why it is failing.
Thanks.
Ryan Gilfether
Programmer
Praxis Inc
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html