|
|

楼主 |
发表于 2005-7-16 11:07:35
|
显示全部楼层
当然可以
测试文件
[php]
//hello.c
#include < almOS.h>
// ---------------------------------------------------------------------
// PilotMain is called by the startup code and implements a simple event
// handling loop.
// ---------------------------------------------------------------------
UInt32 PilotMain( UInt16 cmd, void *cmdPBP, UInt16 launchFlags )
{
EventType event;
if (cmd == sysAppLaunchCmdNormalLaunch) {
// Display a string.
WinDrawChars( "Hello, world!", 13, 55, 60 );
// Main event loop:
do {
// Doze until an event arrives.
EvtGetEvent( &event, evtWaitForever );
// System gets first chance to handle the event.
SysHandleEvent( &event );
// Normally, we would do other event processing here.
// Return from PilotMain when an appStopEvent is received.
} while (event.eType != appStopEvent);
}
return;
}
[/php]
编译方法:
- m68k-palmos-gcc hello.c -o hello
- m68k-palmos-obj-res hello
- build-prc hello.prc "Hello, World" WRLD *.hello.grc
复制代码
以上示范程序与编译方法转载自Linux Palm Developer's Quick Start Guide,Jim Weller著(http://www.jimweller.net/palmdevqs/) |
|