CC65 (mildly off topic)

Started by xlar54, June 16, 2006, 01:23 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

xlar54

Ok, so I installed CC65 on my home machine, and the PATH environment variable is set (under Windows XP).  But when I open up a command window (cmd.exe), it doesnt show the new PATH addition.  Note tho, I havent rebooted yet.  Do I need to reboot for the new PATH addition to show up?

Guest

Did you put the path in a user environment variable, or a system environment variable?  Also, if you set a path in a command window, then close that window, the path information is not persisted.  As a matter of fact, setting the path in a command windown ONLY affects that command window.  You should use the My Computer -> Properties -> Advanced Settings route to modify the path on NT/2000/XP/Vista based machines.

xlar54

(blush) I used the new vbs script that comes with it.  I actually used this install script on a different machine, and everything worked fine.  But if need be, Ill take your notes into account and just set up a batch file to run when the command window opens.  I think there is a autoconfig.nt file that is loaded whenever you open a command window in winxp.  (has to live in c:\windows\system32 i think)

Anyways, thanks - Ill check those items and let you know.

X

BillBuckels

Pre-Configuring a Command Line Compiler Build Environment for Window XP

All of the Aztec C build environments come pre-configured for Windows XP with shortcuts included. What this means is that you unzip the compiler c/w with everything including samples and you are ready to go. All you need to do a build of anything is just type "MAKE" and press return.

On my own machine at home I probably have some 100 or so compilers that co-exist with each other ranging from almost every compiler that Microsoft ever made in the last 20 years or so, lots of Borland stuff, right past the MinGW stuff and into the Aztec-C stuff that I am playing with today.

How we set these up (and indeed how Microsoft sets these up) hasn't changed much in the 30 years except that today we all use shortcuts and MAKEFILE's and in the days before make which weren't many we made do with batch files. Why reinvent the wheel? These other things you are talking about are just not the standard way of setting-up a command line compiler on the IBM-PC.

Stay away from config.nt and stuff of that nature unless you swat flies with a shotgun.

Here's the shortcut from the C64 Aztec-C cross-compiler:



That little command line that calls Aztec.bat says:


%SystemRoot%\system32\cmd.exe /K c:\aztec64\aztec.bat


If you start mucking around with system and user environments you will just botch your system from running other compilers and use up your environment needlessly. If one of my programmers did that I wouldn't say so as kindly and may even suggest delivering pizza as a possible career change.

Here is the Batch File that you use to set-up your environments

This one (Aztec.bat) is from the Aztec64 environment again. They are all the same when it comes to command line compilers and I could just as easily have shown you one from Microsoft or Borland.


@echo off
set CLIB65=C:\AZTEC64\LIB\
set INCL65=C:\AZTEC64\INCLUDE\
set CR65=C:\AZTEC64\OBJ\
set PATH=C:\AZTEC64;C:\AZTEC64\BIN;C:\AZTEC64\TOOLS;C:\WINDOWS\system32;C:\WINDOWS;


Finally, use MAKEFILEs...

Why type the same long-winded command over and over again when the word MAKE is so easy to type and stays in your commandline history usually as the last command you typed (this used to be F3 in old MS-DOS). The MAKEFILE below is from the hello program in Aztec64... every good compiler comes with lots of these and samples that make it easy for you to get up and running.


# ---------------------------------------------------------------------
# Aztec C64 makefile by bill buckels 2007
# ---------------------------------------------------------------------

PRG=hello

$(PRG).B64: $(PRG).asm
   as65 $(PRG).asm
   del $(PRG).asm
   copy $(CLIB65)C64NAT.LIB .
   ln65 $(PRG).rel C64NAT.LIB -b 810
   del $(PRG).rel
   del C64NAT.LIB
   MKBASIC $(PRG) $(PRG).prg
   del $(PRG)
   
$(PRG).asm: $(PRG).c MAKEFILE
    c65 $(PRG).c


Save Your Eyes

And there is one other little thing we could have added to Aztec.bat to save our tired eyes... and I'll leave it to you to figure out what this does... and might I suggest that you press [ALT]+[ENTER] for the same reason when you are in an XP command window.


MODE CON COLS=80 LINES=25


So gentlemen start your compilers and let's code. Relief is just a click away:

http://www.clipshop.ca/Aztec/index.htm#commodore