Danny,

Doesn't #including a file in a .c file basically just tell the
c-preprocessor to put that file's text in the current file?  Since I am
running into a problem with the 32k jump limit, just including the file as
text from a .h file doesn't seem to me like it will solve my main problem.

I am converting a small app to a large app and that is why I am moving
mysecondfunc to a .c file in a second segment.

So...what should I be doing that I am not?  Help!  I appreciate your
experience and input VERY much!

Very truly yours,

Rob G.


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Danny
Epstein
Sent: Monday, May 08, 2000 12:12 PM
To: Palm Developer Forum
Subject: Re: Multi-segment app


"Rob Graber" <[EMAIL PROTECTED]> wrote in message
news:10788@palm-dev-forum...
> When I remove the 'static', then I get an error like:
>
> Warning : function has no prototype

You need to put the prototype in each .c file, or better yet, put it in a .h
file included by both .c files.

> Just exactly what would my ".h" file look like?

At a minimum, it would include the function prototype. You might want to set
it up so it can be #included more than once. In CodeWarrior, this can be
done by putting the following at the top:

    #pragma once

A more universal technique is to wrap the entire file:

    #ifndef __FOO_H__
    #define __FOO_H__

    ... entire contents of file ...

    #endif        // __FOO_H__

where FOO is the name of your .h file in all caps. (This is just a
convention to avoid conflicts.)

> I guess my ignorance in the 'c' programming arena is showing....

You should read a good C book. Check the archives of this list for
suggestions.


--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to