|
From: | Johannes Slotboom |
Subject: | Re: gm2 Digest, Vol 157, Issue 5 |
Date: | Mon, 6 Jan 2020 10:34:42 +0100 |
Send gm2 mailing list submissions to
address@hidden
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.nongnu.org/mailman/listinfo/gm2
or, via email, send a message with subject or body 'help' to
address@hidden
You can reach the person managing the list at
address@hidden
When replying, please edit your Subject line so it is more specific
than "Re: Contents of gm2 digest..."
Today's Topics:
1. Re: gm2 Digest, Vol 157, Issue 2 (Johannes Slotboom)
2. Libncurses [Was: Re: gm2 Digest, Vol 157, Issue 2] (john o goyo)
----------------------------------------------------------------------
Message: 1
Date: Sun, 5 Jan 2020 19:17:45 +0100
From: Johannes Slotboom <address@hidden>
To: address@hidden
Subject: Re: gm2 Digest, Vol 157, Issue 2
Message-ID:
<CAAcvka=jxi6N9uOesg2XJ_fkH-k-FnZJFq7K=+address@hidden>
Content-Type: text/plain; charset="utf-8"
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:
*libncurses.so.5*
and a
*libncursesw.so.5*
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,
Hans
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
> address@hidden
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.nongnu.org/mailman/listinfo/gm2
> or, via email, send a message with subject or body 'help' to
> address@hidden
>
> You can reach the person managing the list at
> address@hidden
>
> 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:
>
>
> http://git.savannah.gnu.org/cgit/gm2.git/tree/gcc-versionno/gcc/m2/examples/ncurses/ncurses.def
>
> 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,
>
> regards,
> Gaius
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> gm2 mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/gm2
>
>
> ------------------------------
>
> End of gm2 Digest, Vol 157, Issue 2
> ***********************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.nongnu.org/archive/html/gm2/attachments/20200105/97259885/attachment.html>
------------------------------
Message: 2
Date: Sun, 5 Jan 2020 15:06:53 -0500
From: john o goyo <address@hidden>
To: address@hidden
Subject: Libncurses [Was: Re: gm2 Digest, Vol 157, Issue 2]
Message-ID: <address@hidden>
Content-Type: text/plain; charset=windows-1252; format=flowed
Greetings, Johannes.
On 01/05/20 13:17, Johannes Slotboom wrote:
> 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
Forgive my ignorance but where is "-lncurses" being specified?
N.
>
> I have:
> *libncurses.so.5*
> and a
> *libncursesw.so.5*
>
> 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,
>
> Hans
>
> 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
> <mailto:address@hidden>> wrote:
>
> Send gm2 mailing list submissions to
> address@hidden <mailto:address@hidden>
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.nongnu.org/mailman/listinfo/gm2
> or, via email, send a message with subject or body 'help' to
> address@hidden <mailto:address@hidden>
>
> You can reach the person managing the list at
> address@hidden <mailto:address@hidden>
>
> 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 <mailto:address@hidden>>
> To: Johannes Slotboom <address@hidden
> <mailto:address@hidden>>
> Cc: address@hidden <mailto:address@hidden>
> Subject: Re: Using pim/log/ulm together and clearing terminal
> Message-ID: <address@hidden
> <mailto:address@hidden>>
> Content-Type: text/plain
>
> Johannes Slotboom <address@hidden
> <mailto: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:
>
> http://git.savannah.gnu.org/cgit/gm2.git/tree/gcc-versionno/gcc/m2/examples/ncurses/ncurses.def
>
> 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,
>
> regards,
> Gaius
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> gm2 mailing list
> address@hidden <mailto:address@hidden>
> https://lists.nongnu.org/mailman/listinfo/gm2
>
>
> ------------------------------
>
> End of gm2 Digest, Vol 157, Issue 2
> ***********************************
>
------------------------------
Subject: Digest Footer
_______________________________________________
gm2 mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/gm2
------------------------------
End of gm2 Digest, Vol 157, Issue 5
***********************************
[Prev in Thread] | Current Thread | [Next in Thread] |