Saturday, April 26, 2008

Modula-2

I tried a little Modula-2 programming today. I used XDS 2.5. I built the following little program successfully in XDS IDE.

MODULE hello;
FROM InOut IMPORT WriteString, WriteLn;
BEGIN
WriteString("Hello, world!");
WriteLn;
END hello.

And I could use xc to compile it. The following error showed up when I used xlink to link it.

XDS Link Version 2.6 Copyright (c) 1995-2001 Excelsior
Fatal error (13): No program entry point


I have googled answers for it and read XDS documentation. Unfornately, I can't find an answer. Again, it shows a quick start guide with some simple examples is extremely important for a beginner to use some new tools.

After wresting with xlink for some time , I worked out the following solution.

xlink hello.obj C:\free\XDS\LIB\x86\libxds.lib C:\free\XDS\LIB\x86\import32.lib C:\free\XDS\LIB\x86\xstart.lib

2 comments:

Terry Ross said...

Just curious, did you try

$ xc =m hello

Which "makes" it, compile & link.

Unknown said...

@qnr
I am new to Modula-2. I had not tried $ xc =m hello when I wrote this post. I have just tried it. It works. Thanks.