Joe Siebenmann <[EMAIL PROTECTED]> wrote in message
news:61388@palm-dev-forum...
> I'm having big problems getting multiple code sections to work with
> PRC-Tools.  I've got the very latest PRC-Tools and Cygwin.  I got the
> 'multiapp' sample app to compile and work okay..  I've tried using a
> makefile modeled after the one in 'multiapp' and from one posted to the
> Developer forum by Aaron Ardiri.  Both compiled okay, but my app bombs
right
> away.  The linker scripts are way over my head..  My project is due very
> soon, and I don't want to have to break it up into two apps..

I just worked through this last week. Here are a few snakes that bit me
along the way...

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".

2. When I broke my application into segments, I went by the sample in
Chapter 20 of "Palm OS Programming Bible" by Lonnon Foster. It showed that
the names of the sections in your .def file do not have double quotes around
them, but one of the samples I found elsewhere did. For example, Foster
uses:
   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.

3. As Foster points out in his book, don't forget to remove (or comment out)
the m68k-palmos-obj-res rule and the lines that mention the .grc files.

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

   I had to use the following to get mine to work:
   $(PRC): $(APP) bin.stamp
      $(BUILDPRC) $(DEF) $(APP) *.bin

   where $(BUILDPRC) is the build-prc tool; $(DEF) is my .def file; $(APP)
is my application name; and $(PRC) is the final result.

I hope this helps! This is what worked for me. YMMV.

   ------> kell





-- 
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