[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CC65 problems



On 1 Sep 2003 10:12:09 -0700, aiiadict@hotmail.com (Rich J.) wrote:

>Can you see what I am doing wrong?  I cannot figure this out.  I have
>tried messing with the switches on the cl65 command line, and I have
>tried everything I can think of to get this to work.

It took me a little bit to figure it out, but the help section for
the Apple II on CC65.org does give you good directions.  They were
the same as I came up with; wish I discovered it sooner!


>Also, the compiler seems to want all the source files and APPLE2.O and
>APPLE2.LIB files in the same directory of Cl65.  I tried making a
>batch file
>that would:
>	set CC65_LIB=c:\cc65\lib
>	set CC65_INC=c:\cc65\include
>but it still says that it cannot find APPLE2.O and APPLE2.LIB.

You'll want to go into your system settings and add these to your
path.  In Windows NT and 2000 you go to your Control Panel, open the
"System" applet, then look for the "Environment Labels" and create new
ones for CC65_LIB and CC65_INC.


>I am trying to figure out how to point cl65 to look in the correct
>directory for LIB, O, and C (source) files, without having to specify
>them in the command line every time.

The Apple2 files go into C:\CC65\LIB - just make sure they are there.

>The INTRO.html file tells you to run cl65 and gives you the command
>with switches, etc.  But it does not tell you WHERE (what directory)
>you are running it from.  Should I be in the BIN directory when I run
>it?  How do I point the compiler to look in the correct directory for
>APPLE2.LIB and APPLE2.O?  How do I point the compiler to look in the
>correct directory for my source file?
>
>THanks
>Rich

This is what I did:

(1) Open the Control Panel, System, Environment Labels
(2) Add "C:\CC65\BIN" to your PATH
(3) Create CC65_INC for "C:\CC65\INCLUDE"
(4) Create CC65_LIB for "C:\CC65\LIB"
(5) Close System applet, open a new DOS window
(6) Type "SET" and hit enter - make sure your PATH and CC65_INC and
CC65_LIB are set correctly (and show up!)

For DOS 3.3 development, I use A2TOOLS to import/export/delete files
on a DOS 3.3 disk image.  You can get it here:

	http://home.echo-on.net/~terryk/a2tools.zip

Unzip the "a2tools.exe" and put into your C:\CC65\BIN directory, that
way it's in your PATH. (See step (2) above)

Here's the commands I use to compile the HELLO sample program and to
put it into a DOS 3.3 disk called "WORKDISK.DSK":

cc65 -O -t apple2 hello.c
ca65 -t apple2 hello.s
ca65 -t apple2 text.s
ld65 -t apple2 -o hello.bin apple2.o hello.o text.o apple2.lib

a2tools del WORKDISK.dsk HELLO.BIN
a2tools in -r B WORKDISK.dsk HELLO.BIN HELLO.BIN

This works perfectly for me.

// CHRIS