Re: [cc65] cl65 -t apple2 works, but cl65 -C apple2.cfg doesn't

From: Greg King <greg.king41verizon.net>
Date: 2007-09-11 06:48:50
From: "Ullrich von Bassewitz"; on Monday, September 10, 2007; at 12:34
PM -0400
>
> This is what happens on my machine with a fresh 2.11.0 install:
>
> -------------------------------------------------------------------------
> uz@trixie:~/samples$ cl65 -C apple2-tgi.cfg tgidemo.c
> ld65: Warning: apple2-tgi.cfg(7): Segment `EXEHDR' does not exist
> -------------------------------------------------------------------------
>
> I've also looked at the sources, and there is no import of __RAM_SIZE__
> in line 13 of crt0.s (as your error message says).  In fact,
> the apple start-up file has never used __RAM_SIZE__ at all.

Yes, that is half of the reason for those error messages.  The other half is
that his command didn't link the Apple 2's start-up file -- it linked the
C64's file (which does want __RAM_SIZE__, and doesn't create EXEHDR.)!


Scott,
you would need to put _both_ of the "-t" and "-C" options on the command
line:

cl65 -t apple2 -C apple2-tgi.cfg tgidemo.c

cl65 is the tool-chain manager; it runs other programs (depending on what
types of files you have at the start of the command's execution, and what
types you want to have at the end).  In the above example,
cl65 gives the "-t" option to cc65 and ca65; then it gives the "-C" option
to ld65.  Also, cl65 looks at the "-t" option when it chooses which start-up
and library files to link with your program.

If you don't put a "-t" option in a cl65 command-line, then cl65 will assume
that you wanted "-t c64".  It isn't smart enough to figure out what a "-C"
option can imply about "-t".  You must tell it explicitly which
platform-type you want.

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Sep 11 09:44:16 2007

This archive was generated by hypermail 2.1.8 : 2007-09-11 09:44:18 CEST