Hi Aaron,
thanks for you quick response.
The same example was succesfully compiled at home on linux without modifications
(or warnings). I used palmdev-prep to set the header files dirs (the printout
showed that it found the files, and the 'specs' file was updated accordingly.
Anyway, shouldn't it complain about it during compilation (not linking)?
Here is the complete printout:
gmake
arm-palmos-gcc -Wall -palmos5 -O2 -c add.c
arm-palmos-gcc -nostartfiles -o add add.o
arm-palmos-gcc -Wall -palmos5 -O2 -c memptrnew.c
arm-palmos-gcc -nostartfiles -e malloc_and_write -o memptrnew memptrnew.c
m68k-palmos-gcc -Wall -palmos5 -O2 -c -o armlet.o armlet.c
In file included from
/home/ftp/ste/eedsima/develop/palmos/sdk-5/Incs/Core/System/AlarmMgr.h:21,
from
/home/ftp/ste/eedsima/develop/palmos/sdk-5/Incs/Core/System/SystemPublic.h:19,
from
/home/ftp/ste/eedsima/develop/palmos/sdk-5/Incs/PalmOS.h:19,
from armlet.c:1:
/home/ftp/ste/eedsima/develop/palmos/sdk-5/Incs/Core/System/ErrorBase.h:193:
warning: `__callseq__' attribute directive ignored
/home/ftp/ste/eedsima/develop/palmos/sdk-5/Incs/Core/System/ErrorBase.h:193:
warning: `__callseq__' attribute directive ignored
/home/ftp/ste/eedsima/develop/palmos/sdk-5/Incs/Core/System/ErrorBase.h:193:
warning: `__callseq__' attribute directive ignored
m68k-palmos-gcc armlet.o -o armlet
armlet.o(.text+0x66):armlet.c: undefined reference to `DmGetResource'
armlet.o(.text+0x70):armlet.c: undefined reference to `MemHandleLock'
armlet.o(.text+0x9c):armlet.c: undefined reference to `PceNativeCall'
armlet.o(.text+0xc6):armlet.c: undefined reference to `PceNativeCall'
armlet.o(.text+0xda):armlet.c: undefined reference to `StrCompare'
armlet.o(.text+0x102):armlet.c: undefined reference to `MemChunkFree'
armlet.o(.text+0x116):armlet.c: undefined reference to `MemHandleUnlock'
armlet.o(.text+0x12c):armlet.c: undefined reference to `EvtGetEvent'
armlet.o(.text+0x132):armlet.c: undefined reference to `SysHandleEvent'
collect2: ld returned 1 exit status
make: *** [armlet] Error 1
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Aaron
Ardiri
Sent: Wednesday, 10 November, 2004 14:09
To: Palm Developer Forum
Subject: Re: can't compile simple example on solaris using prc-tools
> I'm a newbie in this palmos buisiness, but as quite experienced c programmer
> I'm getting frustrated not being able to compile the most simple example from
> prc-tools page http://prc-tools.sourceforge.net/misc/ (armlet.tar.gz).
>
> m68k-palmos-gcc armlet.o -o armlet
> armlet.o(.text+0x66):armlet.c: undefined reference to `DmGetResource'
> armlet.o(.text+0x70):armlet.c: undefined reference to `MemHandleLock'
> armlet.o(.text+0x9c):armlet.c: undefined reference to `PceNativeCall'
> armlet.o(.text+0xc6):armlet.c: undefined reference to `PceNativeCall'
> armlet.o(.text+0xda):armlet.c: undefined reference to `StrCompare'
> armlet.o(.text+0x102):armlet.c: undefined reference to `MemChunkFree'
> armlet.o(.text+0x116):armlet.c: undefined reference to `MemHandleUnlock'
> armlet.o(.text+0x12c):armlet.c: undefined reference to `EvtGetEvent'
> armlet.o(.text+0x132):armlet.c: undefined reference to `SysHandleEvent'
armlet? shouldn't you be doing this:
arm-palmos-gcc armlet.o -o armlet
not to mention you are missing a bunch of compiler flags required so the
ARM code doesn't clash with the PACE environment. calling the system API's
from ARM will require you write callbacks to the "API"'s using PACE.
you'll also need a 68k portion to load the ARM code in place.
maybe, you should be compiling the examples as they should be, in 68k:
m68k-palmos-gcc -palmos4 armlet.o -o armlet
if you have setup your prc-tools correctly, the 68k compiler will find
the header files for the API's in the right place. you might want to check
the makefile examples that exist as well, i have a few on my website for
the 68k setup:
http://www.ardiri.com/palm/cube3d/
http://www.ardiri.com/palm/burning/
cheers.
---
Aaron Ardiri (Skype:: callto://ardiri)
PalmOS Certified Developer
[EMAIL PROTECTED]
http://www.mobilewizardry.com/members/aaron_ardiri.php
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/support/forums/