On Fri, Aug 31, 2001 at 04:59:40PM -0400, Kelly Morrison wrote:
> 1. Make sure that you include the header files for functions that you call
> that are marked as being in a different section. I accidentally left one
> out, and it caused several spectacular crashes until I noted the omission.
> For example, if I have "void FarAwayFunction() FARAWAY_SECTION;" defined in
> "faraway.h", and I call "FarAwayFunction()" in "somewhereelse.c" without
> including "faraway.h", it'll bomb because it'll assume that the function is
> in the same segment as the functions in "somewhereelse.c".
(Actually it'll assume that FarAwayFunction() is in the default .text
section. But the bomb is about the same.)
Yes. As I've mentioned many times, there are compiler warnings to help
you note these omissions. As it says in the documentation,
probably the best policy is to have exactly one declaration for
each function that needs one, in a header file somewhere, and to
use `-Wimplicit', and possibly also `-Wmissing-declarations', to
ensure that the declaration is visible when it needs to be.
Perhaps you can suggest a place where I can write this so that people
will actually read it.
> multiple code { mainform editform }
> whereas I used
> multiple code { "mainform" "editform" }
> I'm not sure if it makes a difference, but the latter works for me.
I hope it's clear in the documentation that it makes no difference (when
the string doesn't look like a reserved word).
> 4. Finally, the rule that calls build-prc in the example in the Foster book
> didn't work for me. It recommended something like:
> myapp.prc: myapp
> build-prc myapp.prc "My App" LFlb myapp.def myapp *.bin
Yes, that is indeed wrong. Tut tut, Lonnie! :-) I think it's clear in
the documentation that a .def file (since it always supplies a type and
creator) may not be used with the old-style invocation with its explicitly
listed type and creator.
> $(PRC): $(APP) bin.stamp
> $(BUILDPRC) $(DEF) $(APP) *.bin
(i.e., new-style invocation.) Uh huh. Although I never understand why
people feel the need to use so many $(MAKE_VARIABLES). Do you really
expect $(BUILDPRC) ever to be anything other than build-prc?
John
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/