[Coco] Question about compiling C in OS-9
richec
rcrislip at neo.rr.com
Tue Apr 13 10:25:06 EDT 2010
On Tuesday 13 April 2010 09:05:40 am Boisy G. Pitre wrote:
> You're right Bob. I went back and looked at the thread and he does have a
> main function. One thing I find puzzling though is that in his c.prep
> test.c output, the main function did not show up (Todd, I presume that you
> pasted the entire output of the c.prep command).
>
> Still there is no doubt at what the linker is telling us. It fails to see a
> main function which is required for resolving. I would be inclined to run
> c.prep test.c again and just verify that there is a main function in
> there. If not, then I would look at the source itself. Line ending
> issues perhaps?
>
> Boisy
>
> On Apr 13, 2010, at 7:53 AM, Bob Devries wrote:
> > Boisy, it's obvious from Todd's first post that he does indeed have a
> > reference to main.
> >
> > Could it be a compile time memory problem? Seems odd for such a short
> > programme segment.
> >
> > --
> > Besides a mathematical inclination, an exceptionally good mastery of
> > one's native tongue is the most vital asset of a competent programmer.
> >
> > Edsger W.Dijkstra, 18 June 1975
> >
> > ----- Original Message ----- From: "Boisy G. Pitre" <boisy at tee-boy.com>
> > To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
> > Sent: Tuesday, April 13, 2010 10:37 PM
> > Subject: Re: [Coco] Question about compiling C in OS-9
> >
> >> Todd,
> >>
> >> The error from the linker is stating that main is an unresolved
> >> reference, and it s being referenced from the psect named "cstart_a"
> >> which resides in /dd/lib/cstart.r.
> >>
> >> Do you have a main function in your test.c program? If not, you need
> >> one.
> >>
> >> Boisy
> >>
> >> On Apr 12, 2010, at 10:07 PM, Todd Wallace wrote:
> >>> Tried what you suggested Stephen. Same error in the end. I have both
> >>> cstart.r and clib.l in /DD/LIB. the captial L flag says it was invalid
> >>> (linker fatal: unknown option -L), so i did the lowercase -l and heres
> >>> the output:
> >>>
> >>> {Term|02}/X1/SOURCES:cc1 test.c -l=/DD/LIB/clib.l
> >>> 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
> >>>
> >>> On Apr 12, 2010, at 10:38 PM, Stephen Castello wrote:
> >>>> cc1 test.c -L=[path]/clib.l
> >>>> where [path] is the directory path to clib.l
> >>>> See C-Compiler manual page 1-13.
> >>>
> >>> --
> >>> Coco mailing list
> >>> Coco at maltedmedia.com
> >>> http://five.pairlist.net/mailman/listinfo/coco
> >>
> >> --
> >> Boisy G. Pitre
> >> http://www.tee-boy.com/
> >>
> >>
> >> --
> >> Coco mailing list
> >> Coco at maltedmedia.com
> >> http://five.pairlist.net/mailman/listinfo/coco
> >
> > --
> > Coco mailing list
> > Coco at maltedmedia.com
> > http://five.pairlist.net/mailman/listinfo/coco
>
> --
> Boisy G. Pitre
> http://www.tee-boy.com/
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>
Hi
I was looking at this thread and noticed a statement with a missing ":" I am
not a "C" programmer, but I have had some experience with C++. Might want to
check the sytax. My 2 cents worth.
More information about the Coco
mailing list