It is currently Sat Dec 16, 2017 7:24 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: C64, cc65 and cscanf
PostPosted: Fri Dec 14, 2007 10:12 am 
Offline

Joined: Mon Oct 01, 2007 10:32 am
Posts: 4
Hello,
As with being coming with Big Blue land and with minor C (major C++ and Pascal / Delphi) experience, I decided to give a try to cc65, as at it is still closer than ASM to my knowledge. (I do have a bit of experience with C64, but that was in '89-93 and I only worked with Basic V2 / Simons Basic / Simons Basic Extensions. and even though the last one had huge possibilities, like having sprites moving with raster interrupts, it was still complete different world.)

Anyways, I started with very simple program and needed to get few chars (more than one) off the keyboard. I decided to use conio instead of stdio, it being a bit faster and my program being single screen tool application. So, I looked at the header files and found cscanf that should be working like scanf, just with direct keyboard input. however, when I compile/link, I get unresolved external on this, so is it really supported on C64 platform? if not, is there any other way than just make my own function using cgetc?

thanks for replies forehand...


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Dec 20, 2007 8:21 pm 
Offline
Site Admin

Joined: Wed Jan 11, 2006 12:22 pm
Posts: 860
Hello and welcome to the club! :)

First of all you must link your c64 projects with c64.o and c64.lib. The order on the command line seems to matter, so this is the order i'm using:

ld65 -C config.txt -L{CC65}lib -o main.o {CC65}lib\c64.o main.c c64.lib

..where {CC65} is the full path to your CC65 directory.

Hope this helps!

RG


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group