C68 newbie issue?

Helpful tips and guides, also new users can ask for help here.
kmmann
ROM Dongle
Posts: 25
Joined: Mon Jun 29, 2015 6:30 pm
Location: Lincoln

C68 newbie issue?

Post by kmmann »

Hi All

I am just trying out C68 for first time in a while and using QPC2 emulator with the latest Black Phoenix set up .

I cannot get started as when I put a basic 'Hello World' together with QD and then try both C68menu and the command line EX CC; (etc) i get the preprocessor error - filename 'V' has no extension - and the process fails. I'm certain this is a real newbie error but can anyone explain or perhaps point me to the listing of errors which can arise within C68?

Thanks

Kevin


Derek_Stewart
Font of All Knowledge
Posts: 3932
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: C68 newbie issue?

Post by Derek_Stewart »

Hi Kevin,

The C68 compiler looks like it can not find the C file to be compiled.

If you have Toolkit 2 installed, point PROG_USE to where the C68 compiler files are located and the DATA_USE should point to the C file to be compiled.

Then just type;

EX win1_C68_cc;'-v win1_helloworld_c -o helloworld_exe -lm'

If you leave out the the -o helloword_exe the compiler will generate the executable file called 'a_out'

Try reading the the start of the C68 manual, as this does detail the C68 setup.

I do not use C68Menu, but I will have look at it and get back to you.
Last edited by Derek_Stewart on Tue Mar 12, 2024 4:14 pm, edited 1 time in total.


Regards,

Derek
kmmann
ROM Dongle
Posts: 25
Joined: Mon Jun 29, 2015 6:30 pm
Location: Lincoln

Re: C68 newbie issue?

Post by kmmann »

Hi Derek

I tried what you suggested and attach the input and output screenshots. I had both Data_use and Prog_use set to win1_, not that that was really necessary since all in the win1_ directory anyway.

Is it that I am trying this in an extended environment? Should I try with my Q68 in a minerva or base QL environment?

Yours

Kevin
Attachments
Screenshot.JPG
Screenshot 2.JPG


Derek_Stewart
Font of All Knowledge
Posts: 3932
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: C68 newbie issue?

Post by Derek_Stewart »

Hi Kevin,

I checked my C68 installation, which looks to be the same version as yours.

I tried the command:

DATA_USE win1_c68_
PROG_USE win1_c68_
EX cc;'-v win1_helloworld_c -o win1_helloworld_exe -lm'

See this screen shot:
QPC2-C68.png
I think you have not specified the device on the source code file.

I have C68 files installed in subdirectory called C68, so other that is is the same.

I tried booting to a standard QPC2 setup with no extensions loaded and the above seemed to work.


Regards,

Derek
User avatar
tofro
Font of All Knowledge
Posts: 2686
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: C68 newbie issue?

Post by tofro »

What do you expect to happen with the „-v” switch?

Simply replace it with “-c”, and you should be fine.

Tobias

PS: c68 works equally fine on basically every QDOS/SMSQ environment.


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Derek_Stewart
Font of All Knowledge
Posts: 3932
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: C68 newbie issue?

Post by Derek_Stewart »

Hi,

The -v or -V command switch in the cc command line puts the compilation process into verbose mode. So all the all compilation messages at each stage, including the linking into an executable.

The cc command switch -c will create a linkable module. No executable created.

The command switch -lm is search libm_a

See C68 Starting_doc for basic setup of C68 compiling and the cc_doc for details of the cc command line switches.

I suppose if the verbose command are not required, but I like to see the compiler messages.

I have been using the same C68 setup on QDOS, Minerva, SMSQ/E on multiple hardware platforms and emulators.


Regards,

Derek
kmmann
ROM Dongle
Posts: 25
Joined: Mon Jun 29, 2015 6:30 pm
Location: Lincoln

Re: C68 newbie issue?

Post by kmmann »

Hi Derek

Which C68 distribution do you use?

or

do you have a 'win' which has c68 within it that I can have.

I have tried all the variants you suggest and still return the same error.

Yours

Kevin


Derek_Stewart
Font of All Knowledge
Posts: 3932
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: C68 newbie issue?

Post by Derek_Stewart »

kmmann wrote:Hi Derek

Which C68 distribution do you use?

or

do you have a 'win' which has c68 within it that I can have.

I have tried all the variants you suggest and still return the same error.

Yours

Kevin
Hi Kevin,

Here is a QWA file with C68 4.24f, which is only 4Mb in size, but the file can be transportable to other QL compatiable containers. I have tested this on: QPC2, SMSQmualtor, Q68 running SMSQ/E v3.34 and Q-Emulator running JS, JM, Minerva roms.
C68.zip
C68 v4242f QWA file
(1.3 MiB) Downloaded 133 times
I have all the C68 files in a subdirectory C68, the boot programme just sets the DATA_USE and PROG_USE settings to WIN1.

The programme: compile_helloworld_bas loads up the comipler and generate the helloworld_exe executable.

The C68 Quill docs are in the subdirectory C68_docs_

C68menu does work better in non-pointer environments, Which I remember there seems to no source code for it so can not be updatd to cope with managed windows.


Regards,

Derek
User avatar
tofro
Font of All Knowledge
Posts: 2686
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: C68 newbie issue?

Post by tofro »

Derek,

the sources for C68menu (the program seems to be Q-Liberated SuperBASIC) are contained in

424fsrc2.zip

Which can be downloaded from Dave Walker's site here
https://itimpi.updog.co/qdosdown.htm

Tobias


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Derek_Stewart
Font of All Knowledge
Posts: 3932
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: C68 newbie issue?

Post by Derek_Stewart »

Hi Tobias,

Thank you for the information, I have actually got that source code file, just my raid server is a little disordered. A little job over Christmas to sort the QL software ot be more ordered.

Do you think it is worth updating Q68Menu?


Regards,

Derek
Post Reply