gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gm2] First time user needs help


From: Duke Normandin
Subject: Re: [Gm2] First time user needs help
Date: Tue, 19 Oct 2010 12:51:32 -0600 (MDT)
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)

On Tue, 19 Oct 2010, Chris Lilley wrote:

> On Tuesday, October 19, 2010, 4:38:24 AM, Duke wrote:
>
> DN> Hello List....
> Hi
>
> DN> gm2 FirstEx.mod
> DN> /tmp/cc88QDty.a(ccCMkDYZstart.o): In function `init(int, char**)':
> DN> cc8SWNIx.cpp:(.text+0x2b0): undefined reference to `_M2_FirstEx_init'
> DN> /tmp/cc88QDty.a(ccCMkDYZstart.o): In function `finish()':
> DN> cc8SWNIx.cpp:(.text+0x301): undefined reference to
> DN> `_M2_FirstEx_finish'
> DN> collect2: ld returned 1 exit status
>

> Like you, I recently took first steps with gm2 (not first with
> modula-2) and like you, I assumed that gm2 foo.mod would work.

hmmmm! 2 noobs on the list at once - could be interesting! :)

> However, at this stage, the gcc environment does not 'know' about
> the modula-2 language in the same way that it knows about C, C++,
> F77, Ada etc.

> So
>
> gm2 -c -g -I. foo.mod
>
> tells it to compile

Cool...

>
> DN> gm2 -c FirstEx.mod
>
> DN> compiles the above code to FirstEx.o, which I'm taking for granted is
> DN> correct.
>
> Yes.
>
> Actually I don't really understand what the -g -I. does, I just
> copied them from http://www.nongnu.org/gm2/gm2.html#SEC6
> DN> So the linking process is getting hosed somewhere. What am I
> DN> missing, please? TIA...
>
>
> gm2 -g -I. FirstEx.mod
>
> will link and produce a.out which is executable. Use -o to get a
> different executable filename.

I'll give that a try!

Are you using the Coronado tutorial as well? or R.J. Sutcliffe's book?
Thanks for the input.
-- 
Duke



reply via email to

[Prev in Thread] Current Thread [Next in Thread]