Dave,

I thought that the syntax was:

EX cc,#chan;'hello_c -v -o hello.exe -lm'

Where

-v is verbose mode, I like to see all the messages from the compiler
-o defines the output program name, if not defined then the output 
program is called a_out
-lm is link modules
#chan is an optional output channel like #1

On the assumption I am not using MAKE to compile C68 programs, then I 
usually use the above method from SBASIC.

Derek


Dave Walker wrote:
> Rich,
>
> You need quotes (either single or double) around the whole of the parameter
> string that follows the EX CC; part.   This is standard for any program that
> does not actually parse out parameters at the Superbasic level.   This will
> normally apply to all programs written and compiled with c68 as well.   If
> you think of the part in quotes being what in Unix/DOS you would type in
> following the command name then it might feel more familiar. 
>
> The PROG_USE folder is the default base location for c68 system files
> although (rather like in Unix) you can over-ride this by using additional
> command line parameters or environment variables.  Think of it as the
> equivalent of the PATH statement in UNIX and/or DOS. The DATA_USE folder is
> the default location for all other files where no explicit path is
> specified.  In other the equivalent of the current directory in other OS.
>
> Does the example actually say that the -o hello.exe follows the quotes, or
> has it omitted that parameter altogether so that the default name of a.out
> gets used for the binary?
>
> Dave
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Rich Mellor
> Sent: 21 February 2007 17:18
> To: [EMAIL PROTECTED]
> Subject: Re: [ql-users] c68 guide for one who wants to know.
>
> Dave,
>
> This is always one of the stumbling blocks of any programs ported across  
>  from Linus etc.
>
> The manuals say, as have you to enter the command:
>
>       EX cc;'hello_c' -o hello.exe
>
> This gives a syntax error in SuperBASIC, so is hardly a help to a user.
>
> Now I am not too certain myself, but surely in SuperBASIC you need:
>
> PROG_USE flp1_: REMark location of c68 programs
> DATA_USE flp2_: REMark location of c files (and output??)
> EX cc;"'hello_c' -o hello.exe"
>
> Does that work?
>
> Rich
>
>
> On Wed, 21 Feb 2007 17:08:34 -0000, Dave Walker <[EMAIL PROTECTED]>  
> wrote:
>
>   
>> Neil,
>>
>> Did you try reading the STARTING.doc file?    This is intended to get you
>> started as quickly as possible.    If you are already an experienced user
>> then the QdosC68.doc file is likely to be of interest to see how certain  
>> OS
>> dependent features have been mapped to QDOS.   Most of the rest of the
>> documentation is reference documentation.
>>
>> C68 is command line oriented as is normally the case on unix/Linux style
>> systems.  As you get more advanced you probably start use the make
>> sub-system to avoid typing in command lines all the time.  A full GUI  
>> system
>> like Visual C does not make sense without an interactive de-bugger -
>> something is that on the "wish list" for c68.
>>
>> In terms of editing - then yes any text editor will do.  A simple text
>> editor called QED is supplied on the runtime disks for those who do not
>> already have one.  However most users will have one for other purposes  
>> and
>> you would normally continue to use your favourite.
>>
>> Regarding your hello world program in c68 you do basically just do:
>>
>>      EX cc;'hello_c' -o hello.exe
>>
>> and this should create you an file called hello.exe.  Omit the -o option  
>> and
>> the binary file has the default name of a.out (again from unix legacy).
>>
>> Dave
>>
>>
>> -----Original Message-----
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] On Behalf Of Neil Riley
>> Sent: 21 February 2007 16:03
>> To: [EMAIL PROTECTED]
>> Subject: Re: [ql-users] c68 guide for one who wants to know.
>>
>> Hi Dave,
>>
>> I have C reference manuals and numerous books on the subject but as
>> I sit in front of my QL I think, "Now, how do i use C68 to write that
>> Hello
>> world C program", by that I don't mean the source, i.e.
>>
>> #include <stdio.h>
>>
>> void main(void)
>> {
>>     // I hope this is right !
>>     printf ("Hello World");
>> }
>>
>> ... or whatever the correct syntax is.
>>
>> I mean, what do i do/use to enter the source ( i shan't assume i could
>> use any text
>> editor although i guess I can). how do i Link / compile... what gets
>> generated etc
>> etc etc. It's that which is a mystery to me as is all the numerous
>> options i read about
>> in the c68_doc.
>>
>> Amazed it wasn't PTR'izd with a rather friendly debugger thrown into
>> the mix ;-) ,
>> although I have come across a front end screen that seems to link
>> various parts
>> of C68 together, perhaps thats my starting point.
>>
>> Cheers
>>
>> Neil
>> p.s. I use Visual Studio 2005 Professional in work which deffo won't
>> run in 4Mb ram !
>>
>>
>>
>>
>>     
>>>>> [EMAIL PROTECTED] 21 February 2007 15:34 >>>
>>>>>           
>> You are correct in that there is no document for those who are not
>> already
>> familiar with C.  It was deemed a lot of work to write such a document
>> and
>> there are plenty of books around that already cover that.
>>
>> What is on the documentation disk is a guide to how C maps onto the
>> QDOS
>> environment.  Also available is the detailed library reference
>> material.
>>
>> Note that if anyone does provide any "getting started" type documents I
>> am
>> more than happy to add them to the standard set.
>>
>> I recently took early retirement, so if anything interesting comes up
>> that
>> might be c68 related I should now have free time to work on it.   There
>> have
>> not been any developments in c68 for quite a few years now, but that
>> does
>> not mean that there are not a number of things that have not been
>> identified
>> that might be worth working on.
>>
>> Another thing that I have thought of working on is a port of gcc to the
>> QDOS
>> environment to replace c68.    It would definitely not run on
>> unexpanded QL
>> systems as I would expect any system with less than about 4Mb RAM would
>> be
>> unable to run it, but would have the advantage of getting a maintained
>> compiler onto QDOS/SMSE as well as supporting C++ facilities in
>> addition to
>> standard C.  However it is not worth putting any effort into this if
>> there
>> would not be a reasonable demand for it.
>>
>> Dave
>>
>>
>> -----Original Message-----
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] On Behalf Of Neil Riley
>> Sent: 21 February 2007 14:20
>> To: [EMAIL PROTECTED]
>> Subject: Re: [ql-users] c68 guide for one who wants to know.
>>
>> Thanks for the link, I've stumbled upon that page already and it
>> doesn't
>> cater
>> for the beginner. For example, there is source but i haven't found a '
>> beginners
>> start here' section . As Phil Kett stated in an earlier email, I'm
>> willing to learn but
>> have hit a wall.
>>
>> I shall just play around with the executables I have on my hard drive
>> and hope
>> it all becomes clear.
>>
>> Cheers
>> Neil
>>
>>     
>>>>> [EMAIL PROTECTED] 21 February 2007 13:27 >>>
>>>>>           
>> [EMAIL PROTECTED] wrote:
>>
>>     
>>> under the C68 programming environment. Is there a Tutotorial on the
>>> subject?
>>>       
>> There have been a coupls of 'introductions' to C68 in recent years.
>> None of them seemed to continue beyond the initial episode. Mind you,
>> I
>> don't remember if this was intended to be a series (similar to say my
>> Assembly language or Herb's Graphics) in QL Toady, or not.
>>
>>     
>>> Do i need to buy back issues of QL Toady or is there an idiots guide
>>> already out there? Also, Is there a fast way of checking what
>>>       
>> version
>> of C68 I
>>
>> I don't think it is worth your while trying to buy back issues of QL
>> Toadt for a C68 Tutorial, but it might be very useful for other stuff
>> !
>>
>> I don't know/Can't remember how to find out the C68 version at
>> present.
>> With all the Assembly I've been doing, my C68 skills, not that I had
>> many, are sadly slipping away ....
>>
>> Dave Walker's web site is the best place to go for C68, he's at :
>>
>> http://homepage.ntlworld.com/itimpi/index.htm
>>
>> And the latest version there seems to be 4.24f.
>>
>>
>>
>> Cheers,
>> Norman.
>>
>> _______________________________________________
>> QL-Users Mailing List
>> http://www.q-v-d.demon.co.uk/smsqe.htm
>>
>>
>>     
> ****************************************************************************
>   
>> *******
>> The contents of this email are confidential to the intended recipient.
>> It may not be disclosed to or used by anyone other than the addressee,
>> nor
>> may it be copied in any way. If received in error, please contact the
>> company on 01793-715380, then delete it from your system. Please note
>> neither the company nor the sender accepts any responsibility for
>> viruses
>> and it is your responsibility to scan attachments (if any) for
>> viruses.
>> No contract may be concluded on behalf of the company by means of
>> email
>> communications.
>>
>> BC Services (UK) Limited (trading as Boxclever), Technology House,
>> Ampthill Road, Bedford, MK42 9QQ.  Registered No. 5290544 England
>>
>>  www.boxclever.co.uk
>>
>>     
> ****************************************************************************
>   
>> *******
>>
>> _______________________________________________
>> QL-Users Mailing List
>> http://www.q-v-d.demon.co.uk/smsqe.htm
>>
>> _______________________________________________
>> QL-Users Mailing List
>> http://www.q-v-d.demon.co.uk/smsqe.htm
>> _______________________________________________
>> QL-Users Mailing List
>> http://www.q-v-d.demon.co.uk/smsqe.htm
>>
>> _______________________________________________
>> QL-Users Mailing List
>> http://www.q-v-d.demon.co.uk/smsqe.htm
>>
>>
>>     
>
>
>
>   
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to