--- Massimo Penta wrote:
> I've used the single segment starterapp.c
> template in cw8 and simply added a call to
> myfunction in the original appstart
> function. I get the followiong compilation
> error: funciton has no prototype.
> ...
> # include "function.h"
> static Err myfunction()
> {
> return 1;
> }
> ...
> #include <PalmOS.h>
> static Err myfunction(void);
>
1. The function declaration and function definition
are not the same. (Though I'm not sure the compiler
cares about the missing "void").
2. The word "static" in front of a function restricts
access to that function to that source file, so you
can't call it from another file.
Any book on C should explain how to do this correctly.
__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/