Of course, a compiler needs information about the environment it is compiling for. Fortunately Palm makes available, free of charge, SDKs (Software Development Kits) for all versions of its OS, from 1.0 to 4.0.
Palm also provides POSE, the Palm OS Emulator, a tool that emulates a full Palm device in software, which can greatly speed debugging. It works with GDB and other Linux debuggers.
Finally, there are many books, and web tutorials, and other goodies to help you learn about Palm programming.