[Top][All Lists]
[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
- [Gm2] First time user needs help, Duke Normandin, 2010/10/18
- Re: [Gm2] First time user needs help, Chris Lilley, 2010/10/19
- Re: [Gm2] First time user needs help, Gaius Mulley, 2010/10/19
- Re: [Gm2] First time user needs help,
Duke Normandin <=
- Re: [Gm2] First time user needs help, Chris Lilley, 2010/10/19
- Re: [Gm2] First time user needs help, Duke Normandin, 2010/10/19
- RE: [Gm2] First time user needs help, Breeden, Thomas (tmb), 2010/10/20
- RE: [Gm2] First time user needs help, Duke Normandin, 2010/10/20
- Re: [Gm2] First time user needs help, Gaius Mulley, 2010/10/22