Search code examples
modula-2

Fatal error (13): No program entry point with XDS Modula-2?


I'm using the current bundled binaries from https://github.com/excelsior-oss/xds (as of 12/6/2020) with just the most basic Hello World MOD file:

MODULE HelloWorld;

FROM STextIO IMPORT WriteLn, WriteString;

BEGIN

   WriteString("Hello, World!");
   WriteLn;

END HelloWorld.

xc HelloWorld.mod works fine for compiling it to object. However, I'm not clear on the exact syntax for xlink on a standalone MOD file. xlink HelloWorld.obj will at least get it to try with my object file, but as the error shows, it doesn't know the entrypoint. I've tried setting the entry point with the /ENTRY switch, but no luck doing it by module name. I've also tried setting the /SYS to console, but again, no luck there.

I feel there's some trivial linker option or program directive needed, but I'm just not finding it via Google...


Solution

  • To build a binary, use: xc =a =make HelloWorld.mod

    The above is found in https://github.com/excelsior-oss/xds/blob/master/Sources/Doc/Comp/src/usage.tex . It is unfortunate that XDS did not put PDFs of their documentation on github. I suggest building the documentation from their LaTeX files.

    Edit: I since learnt that the Wayback Machine has archived the XDS documentation here: https://web.archive.org/web/20060705213825/http://www.excelsior-usa.com/xdsdoc.html