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: Chris Lilley
Subject: Re: [Gm2] First time user needs help
Date: Tue, 19 Oct 2010 16:25:57 +0200

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.

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

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.





-- 
 Chris Lilley   Technical Director, Interaction Domain                 
 W3C Graphics Activity Lead, Fonts Activity Lead
 Co-Chair, W3C Hypertext CG
 Member, CSS, WebFonts, SVG Working Groups




reply via email to

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