In article <[EMAIL PROTECTED]>, Saurabh Agarwal wrote: > Hi, > > I am getting the following error when trying to compile my palm code using > prc-tools. > ERROR: > ******************** > /usr/m68k-palmos/bin/ld: cannot open scrt0.o: No such file or directory > collect2: ld returned 1 exit status > make: *** [MsgLib.lib] Error 1 > > My gcc version is: > ******************** > $ m68k-palmos-gcc -v > Reading specs from /usr/lib/gcc-lib/m68k-palmos/2.95.3-kgpd/specs > Reading specs from /usr/lib/gcc-lib/m68k-palmos/specs > gcc version 2.95.3-kgpd 20010315 (release) > > My Makefile is: > ******************** > # name of program > PROGRAM = MsgLib > > #The icon title of the application, on the palm > DESCRIPTOR= MSGA > > DEF = $(PROGRAM).def > > # C sources derived to: > OBJS = MsgLibDispatch.o MsgLibImpl.o InitGlobals.o Backup.o InitStruct.o > MsgLibInterface.o XD10p.o XD10.o Common.o ProcessRequest.o CBCommand.o > $(PROGRAM)-sections.o > > #The names of: the resource file, the library (which is built by make) > and the output > PROGLIB = $(PROGRAM).lib > PRC=$(PROGRAM).prc > > # compilers and linker > CC=m68k-palmos-gcc > AS = m68k-palmos-as > MAKELIB = $(CC) -shared -g -O1 -lgcc -Wmissing-declarations -Wall > -L/m68k-palmos/lib -Xlinker -Map -Xlinker $(PROGRAM).map -o > CFLAGS = -Wall -O2 -palmos4 > LINK = build-prc -o > > all: clean $(PRC) > > # to make the application xxx.prc > $(PRC): $(PROGLIB) $(DEF) > $(LINK) $(PRC) $(DEF) $(DESCRIPTOR) $(PROGLIB) > # make clean > > # to librarize those source(s) > $(PROGLIB): $(OBJS) > $(MAKELIB) $(@) $(OBJS) > > MsgLibDispatch.o: MsgLibDispatch.c > MsgLibImpl.o: MsgLibImpl.c > MsgLibInterface.o: MsgLibInterface.c MsgLibInterface.h > XD10p.o: XD10p.c XD10p.h > CBCommand.o: CBCommand.c CBCommand.h > InitGlobals.o: InitGlobals.c InitGlobals.h > Common.o: Common.c Common.h > ProcessRequest.o: ProcessRequest.c ProcessRequest.h > XD10.o: XD10.c XD10.h > Backup.o: Backup.c Backup.h > InitStruct.o: InitStruct.c InitStruct.h > > $(PROGRAM)-sections.o: $(PROGRAM)-sections.s > > $(PROGRAM)-sections.s: $(DEF) > m68k-palmos-multigen $(DEF) > > # clean-up functions > clean: > rm -f *.[oa] *~ $(PROGLIB)
I do not know where you got your Makefile, but it shows the author not being well-versed with PalmOS programming. Your problem is still the MAKELIB step. In fact this step is not about making a library, but about doing the final link. Your final link step (using build-prc) is more a post-processing step to produce the prc from the output of the link and combining it with the other resources (typically the output of PilRC). There is no conventional shared library (.so in Unix/Linux .dll in Windows) in PalmOS so the -shared option to ld is not working. SysLibs and GLibs are the PalmOS equivalent, but require different steps to produce them. In the MAKELIB (again wrong name) step get rid of both the -nostartfiles and the -shared option. Hope this helps. Ton van Overbeek -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
