[Coco] Question about compiling C in OS-9

Stephen Castello zootzoot at cfl.rr.com
Tue Apr 13 13:42:55 EDT 2010


On Mon, 12 Apr 2010 18:42:43 -0400, Todd Wallace <dragonbytes at cox.net>
had a flock of green cheek conures squawk out:

>
>Hey all,
>
>I'm trying to figure out how to use this microware C compiler for OS-9.  But I am stumped as to how to resolve this error.  If you aren't in to C on OS-9, just disregard this.  Below is my little test program and the output from the compiler.  If anyone could shed some light on what I'm doing wrong, I'd appreciate it. Thanks :-)
>
>#include "/X1/DEFS/stdio.h"
>
>main(argc,argv)
>{
>printf"testing";
>}
>
>This is the output I get when trying to compile it:
>
>{Term|02}/X1/SOURCES:cc1 test.c
>CC1 VERSION RS 01.00.00
>COPYRIGHT 1983 MICROWARE
>REPRODUCED UNDER LICENSE
>TO TANDY
>'test.c'
>c.prep:
>c.pass1:
>c.pass2:
>c.opt:
>c.asm:
>c.link:
>Unresolved references:
> main             cstart_a         in /dd/lib/cstart.r
>linker fatal: unresolved references
>
>
>- Todd Wallace

I just noticed that you're not defining argc and argv for main and you
have left off the () for the printf.

Try this one:

#include "/X1/DEFS/stdio.h"

main(argc,argv)
int argc;
char **argv;
{
	printf("testing/n");
}

-- 

Stephen

Gossip is when you hear something you like about someone you don't.



More information about the Coco mailing list