"Hello, World!" with cc65

Chat about anything CX16 related that doesn't fit elsewhere
SlithyMatt
Posts: 913
Joined: Tue Apr 28, 2020 2:45 am

"Hello, World!" with cc65

Post by SlithyMatt »



3 hours ago, MontyHall said:




I can't get hello world to work.  I'm running ubuntu 20 and compiled cc65.



When I make I get the following:



(base) rick@rick:~/workspace/x16-hello-cc65$ make

make -C asm

make[1]: Entering directory '/home/rick/workspace/x16-hello-cc65/asm'

cl65 -t cx16 -o HELLOASM.PRG -l hello.list hello.asm

ld65: Error: Cannot find config file 'cx16.cfg'

make[1]: *** [Makefile:4: all] Error 1

make[1]: Leaving directory '/home/rick/workspace/x16-hello-cc65/asm'

make: *** [Makefile:2: all] Error 2



I have cc65/bin in my path. I suspect I need to hack the make file to point to configs.



You shouldn't have to do that. cl65 should automatically look in ../cfg relative to the executable for the config file. Make sure it's still there, and that you are using the cc65 you built. Do a "which cl65" and see what comes up. If you have another cc65 toolchain in your path, that could mess things up, especially if that one doesn't have cx16 support built in. Worst case, if you can't figure out what's wrong, you can explicitly point to cx16.cfg by using the -C option with cl65.

MontyHall
Posts: 8
Joined: Tue Oct 13, 2020 11:04 pm

"Hello, World!" with cc65

Post by MontyHall »


This is what I get when I "which cl65": /home/rick/workspace/cc65/bin/cl65.   

 

Yeah, I don't know what's going on.  I'll just hack the make file.  but I think I'll try the env vars first.

 

EDIT: I tried the exports, no luck.  I guess I'll hack the make file.

 

 

Greg King
Posts: 162
Joined: Wed Jul 08, 2020 1:14 pm

"Hello, World!" with cc65

Post by Greg King »


Do the ld65 configure files exist on your system?  They should be in "~/workspace/cc65/cfg/".

MontyHall
Posts: 8
Joined: Tue Oct 13, 2020 11:04 pm

"Hello, World!" with cc65

Post by MontyHall »


Yes, I have a ~/workspace/cc65/cfg/" dir

SlithyMatt
Posts: 913
Joined: Tue Apr 28, 2020 2:45 am

"Hello, World!" with cc65

Post by SlithyMatt »



1 hour ago, MontyHall said:




Yes, I have a ~/workspace/cc65/cfg/" dir



Is cx16.cfg in there?

MontyHall
Posts: 8
Joined: Tue Oct 13, 2020 11:04 pm

"Hello, World!" with cc65

Post by MontyHall »


Yes

SlithyMatt
Posts: 913
Joined: Tue Apr 28, 2020 2:45 am

"Hello, World!" with cc65

Post by SlithyMatt »



1 hour ago, MontyHall said:




Yes



Well, you got me stumped.

MontyHall
Posts: 8
Joined: Tue Oct 13, 2020 11:04 pm

"Hello, World!" with cc65

Post by MontyHall »


Thanks, looks like -C ${HOME}/workspace/cc65/cfg/cx16.cfg work.  too bad that it has to be so verbose, but at least I can get moving.

 

Thanks

 

Greg King
Posts: 162
Joined: Wed Jul 08, 2020 1:14 pm

"Hello, World!" with cc65

Post by Greg King »


Please try an experiment.  Execute this command:
cl65 --print-target-path
Does it show "/home/rick/workspace/cc65/target"?

geek504
Posts: 95
Joined: Wed Aug 26, 2020 4:52 pm

"Hello, World!" with cc65

Post by geek504 »



23 minutes ago, Greg King said:




Please try an experiment.  Execute this command:




cl65 --print-target-path



Does it show "/home/rick/workspace/cc65/target"?



For @MontyHall:

cl65-path.PNG.5d58f5e226b6b297fa0cab244f836954.PNG

Post Reply