[comp.sys.amiga.programmer] -Lamiga woes with SAS/C 5.10

rknop@nntp-server.caltech.edu (Robert Andrew Knop) (05/13/91)

I've pared the program test.c down to the bare essentials:

main()
{
   printf("This is a test\n");
}


When I compile this under Lattice C 5.10 with the command

lc -L test

everything works as expected.  However, when I compile it with the command:

lc -Lamiga test

When I run the program with the command "test," nothing happens.  I am returned
to my AmigaDOS prompt, with no string having been printed.

Can anybody tell me what the heck is going on here?

On a related note, could anybody direct me to a decent reference on using the
AmigaDOS functions from C?  All I want to do is raipdly read a binary file
into a memory buffer.  The Amiga O/S is new to me, and I am not familiar with
all its quirks.  And I don't seem to have a reference on hand that would care
to explain any of these quirks regarding reading files.

Thanks,

-Rob Knop
rknop@tybalt.caltech.edu

nfs1675@dsacg3.dsac.dla.mil (Michael S Figg) (05/16/91)

In article <1991May13.084001.20525@nntp-server.caltech.edu>, rknop@nntp-server.caltech.edu (Robert Andrew Knop) writes:
> 
> lc -Lamiga test
> 
> When I run the program with the command "test," nothing happens.  I am returned
> to my AmigaDOS prompt, with no string having been printed.
> 
> -Rob Knop


I don't know if this is the answer or not since it worked with another compile,
but try renaming your program. I was bitten by a similar problem with BSD UNIX
and found that 'test' was a reserved word. Although I had a clean compile, the
'test' I was executing wasn't the 'test' I had compiled!


---Mike



-- 
                                              | Michael Figg  DSAC-FSD
My Karma ran over your Dogma!                 | DLA Systems Automation Center
                                              | Cols, Ohio mfigg@dsac.dla.mil
                                              | CIS: 73777,360    

jay@deepthot.cary.nc.us (Jay Denebeim) (05/17/91)

In article <1991May13.084001.20525@nntp-server.caltech.edu> rknop@nntp-server.caltech.edu (Robert Andrew Knop) writes:
>When I compile this under Lattice C 5.10 with the command
>
>lc -L test
>
>everything works as expected.  However, when I compile it with the command:
>
>lc -Lamiga test
>
>When I run the program with the command "test," nothing happens.  I am returned
>to my AmigaDOS prompt, with no string having been printed.
>
>Can anybody tell me what the heck is going on here?

Yeah, simple.  Read pages C50-C51 of your manual.

>
>Thanks,
>
>-Rob Knop
>rknop@tybalt.caltech.edu

--

 |_o_o|\\
 |. o.| || The           Jay Denebeim
 | .  | ||  Software
 | o  | ||   Distillery
 |    |//        Address: UUCP:     mcnc.org!deepthot.uucp!jay
 ======                   Internet: jay@deepthot.cary.nc.us
                 BBS:(919)-460-7430      VOICE:(919)-460-6934