On Mon, Mar 24, 2003 at 08:13:01PM -0700, Eddie Ludema wrote: > SRC=$(APP).c section1.c section2.c > SECTIONS=$(APP)-sections > CC=m68k-palmos-gcc > MULTIGEN=m68c-palmos-multigen
...you would think that the typo here was a signal that $(MULTIGEN) is not in fact being used... > $(APP): $(SRC:.c=.o) $(SECTIONS).ld > $(CC) $(CFLAGS) -o $@ $^ ...and this misses out myMain-sections.o. >> section2.c:12: undefined reference to '__text__section1' >> collect2: ld returned 1 exit status The __text__<sectionname> symbols are defined in <foo>-sections.s, as generated by multigen. If they are undefined, it is because that file has not been assembled and included in your link. And indeed, according to your overcomplicated makefile, it has not been. > Could somebody point me to some good solid source code examples that > implement multiple segments using PRC-Tools? Study the multiapp makefile from the prc-tools samples. You might complain that it is a simple makefile for a trivial application, but the fact is that it contains the solution to the problem you are experiencing. > I've already searched the archives for this list, > Palm's knowledge base, PRC-Tools documentation, manuals for > gcc/multigen/build-prc/etc as well as faqs on falch.net. Don't just search them; *read* them. Reread http://prc-tools.sf.net/cgi-bin/info/breaking+up+an+existing+application this time paying attention to steps 4 and 5. John -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
