[Top][All Lists]

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

Re: gm2 Digest, Vol 157, Issue 2

From: Johannes Slotboom
Subject: Re: gm2 Digest, Vol 157, Issue 2
Date: Sun, 5 Jan 2020 19:17:45 +0100

Dear Gaius

Sorry for another mail from me about the usage of the ncurses.def to enable "clear()" of the working terminal.
I copied the ncurses.def file into the directory where I do the compilation. I imported the clear functionality from it.
Than my Modula-2 file nicely compiles, but it does not link:

gm2 -g -I. -I/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/pim -I/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/log -I/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/min -flibs=pim,log -fmakeall ./SpinSimMain.mod
make: Nothing to be done for 'SpinSimMain'.
/tmp/ccDs7BDg.a(SpinSimMain.o): In function `Define_Batch':
/home/slotboom/development/DEF_SIMU/./SpinSimMain.mod:1531: undefined reference to `clear'
collect2: error: ld returned 1 exit status

I have:
and a

in the /lib/x86_64-linux-gnu directory and the .bashrc LD_LIBRARY_PATH includes this directory.

One questions I have therefore:

- are these the libraries I need to link the application to get the "clear()" function working, or do I need another ncurses library to be installed?

Have a nice evening,


P.S. I have in the meantime got another MODULA-2 application working (apart from the clear() function) and am very happy with it!

On Fri, Jan 3, 2020 at 6:04 PM <address@hidden> wrote:
Send gm2 mailing list submissions to

To subscribe or unsubscribe via the World Wide Web, visit
or, via email, send a message with subject or body 'help' to

You can reach the person managing the list at

When replying, please edit your Subject line so it is more specific
than "Re: Contents of gm2 digest..."

Today's Topics:

   1. Re: Using pim/log/ulm together and clearing terminal
      (Gaius Mulley)


Message: 1
Date: Fri, 03 Jan 2020 13:42:09 +0000
From: Gaius Mulley <address@hidden>
To: Johannes Slotboom <address@hidden>
Cc: address@hidden
Subject: Re: Using pim/log/ulm together and clearing terminal
Message-ID: <address@hidden>
Content-Type: text/plain

Johannes Slotboom <address@hidden> writes:

> Dear Gaius,
> I have my old Logitech Modula-2 program compiling again, and I am very
> happy about that!!!
> Since my program is a late 80tees beginning 90tees style where the
> user interactively selects from presented text menus in the console
> (newly bash-shell) I am in need for an equivalent for the Logitech
> Modula-2 "Screenmode(3)" functionalityt which cleared the DOS-screen
> and printed the new menu from the top of the screen again.
> I tried to simulate this behaviour by writing character 33:
> Write( CHR(33) );
> ( CHR(33) should be the erase shell character.)
> however this unfortunately does not work. Than I saw that in the Ulm
> library there is a module called "CallShell" in which I plan to call
> "clear" which would do the trick (I hope at least).
> VAR status: CARDINAL;
> BOOLEAN response := PROCEDURE Shell( "clear", status );

Hi Hans,

yes the special character codes are not interpreted (yet) in
Display/Terminal.  This could be added though.  At present there is a
substitute - which is to use the ncurses.def found in the examples:

there are a few tiny example programs in the same directory.

> however if I try the latter there seem to be a problem with using the
> pim and ulm libraries. Namely trying to build my application with:
> gm2 -g -I. -
> I/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/pim -
> I/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/log -
> I/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/min -
> I/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/ulm -
> flibs=pim,log,ulm -fmakeall ./ilv.mod
> results in the following terminal output:
> gm2 -c -fmakeall0 -
> B/home/slotboom/opt/lib/gcc//x86_64-pc-linux-gnu/8.2.0 -g -fonlylink -
> fobject-path=. -
> fobject-path=/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/pim
> -fobject-path=/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/log
> -fobject-path=/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/min
> -fobject-path=/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/ulm
> -ftarget-ar=/usr/bin/ar -ftarget-ranlib=/usr/bin/ranlib -fplugin=m2rte
> -flibs=pim,log,ulm -fmakeall -I. -
> I/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/pim -
> I/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/log -
> I/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/min -
> I/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/ulm -
> I/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/pim -
> I/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/log -
> I/home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/ulm -I -I .
> /ilv.mod
> /home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/ulm/libulm.a
> (libulm_la-SYSTEM.o): In function `_M2_SYSTEM_init':
> /home/slotboom/build-8.2.0/x86_64-pc-linux-gnu/libgm2/libulm/SYSTEM.c:622:
> multiple definition of `_M2_SYSTEM_init'
> /home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/pim/libgm2.a
> (SYSTEM.o):/home/slotboom/build-8.2.0/x86_64-pc-linux-gnu/libgm2/libpim/SYSTEM.def:20:
> first defined here
> /home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/ulm/libulm.a
> (libulm_la-SYSTEM.o): In function `_M2_SYSTEM_finish':
> /home/slotboom/build-8.2.0/x86_64-pc-linux-gnu/libgm2/libulm/SYSTEM.c:773:
> multiple definition of `_M2_SYSTEM_finish'
> /home/slotboom/opt/lib/gcc/x86_64-pc-linux-gnu/8.2.0/m2/pim/libgm2.a
> (SYSTEM.o):/home/slotboom/build-8.2.0/x86_64-pc-linux-gnu/libgm2/libpim/SYSTEM.def:20:
> first defined here
> collect2: error: ld returned 1 exit status
> So my additional question (apart from erasing the bash shell) is the
> question whether the ulm, log, pim and iso libraries cannot be used
> together in one application?

it should be possible to use pim, iso and log in a single application.
The ulm is probably best to work with alone (or maybe with pim).  If you
use coroutines then you have to decide on a particular paradigm and not
mix them :-).  In conclusion they are designed to work together but if
the modules utilise aspects of SYSTEM.def/mod which contain different
declarations of the same named entity then problems arise,

hope that helps,



Subject: Digest Footer

gm2 mailing list


End of gm2 Digest, Vol 157, Issue 2

reply via email to

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