Page 5 of 8

"Hello, World!" with cc65

Posted: Wed Oct 14, 2020 2:08 am
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.


"Hello, World!" with cc65

Posted: Wed Oct 14, 2020 11:01 pm
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.

 

 


"Hello, World!" with cc65

Posted: Thu Oct 15, 2020 2:13 am
by Greg King

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


"Hello, World!" with cc65

Posted: Fri Oct 16, 2020 12:17 am
by MontyHall

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


"Hello, World!" with cc65

Posted: Fri Oct 16, 2020 1:28 am
by SlithyMatt


1 hour ago, MontyHall said:




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



Is cx16.cfg in there?


"Hello, World!" with cc65

Posted: Fri Oct 16, 2020 1:29 am
by MontyHall

Yes


"Hello, World!" with cc65

Posted: Fri Oct 16, 2020 2:46 am
by SlithyMatt


1 hour ago, MontyHall said:




Yes



Well, you got me stumped.


"Hello, World!" with cc65

Posted: Sat Oct 17, 2020 1:49 am
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

 


"Hello, World!" with cc65

Posted: Sat Oct 17, 2020 3:07 pm
by Greg King

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


"Hello, World!" with cc65

Posted: Sat Oct 17, 2020 3:32 pm
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