Re: Problem when using NCurses

Dmitry Matveev <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.gnu.general
Message-ID <CAOW=R8mHsQLsM+y0NkaK_KhPOdWZv9LyA6bvwLp=CY_gxxbdPg@mail.gmail.com>
Hi Olivier,

The snippet looks OK.

If you do not want to call PackageLoader/DLD code every time, you can
create a package for your NCurses application which will contain these
details.

More details here:
http://smalltalk.gnu.org/wiki/creating-and-distributing-packages (see
"<module>")

Dmitry

2016-03-28 13:19 GMT+03:00 olivier auverlot <[email protected]>:

> I have dug in the mailing list archive and I found a similar problem. It
> seems that I must write the following code:
>
> PackageLoader fileInPackage: 'NCurses'.
>
> DLD addLibrary: 'libncurses.so.5'.
> NCWindow clock.
>
> The code snippet runs fine but it's correct ? Can we do better ?
>
> Olivier
>
> 2016-03-28 11:49 GMT+02:00 olivier auverlot <[email protected]>:
>
> > Hi,
> >
> > I try to use NCurses with GNU Smalltalk but I have some difficulties.
> >
> > I have downloaded the version 3.2.5 of GNU Smalltalk and compiled it on a
> > Debian server (8.3 - 64 bits).
> >
> > Gst works fine but if I try to use NCurses with the code:
> >
> > PackageLoader fileInPackage: 'NCurses'.
> > NCWindow clock
> >
> > I got the following error message:
> >
> > Object: CFunctionDescriptor new: 1 "<0x7f23abdbb2c0>" error: Invalid C
> call-out initscr
> > SystemExceptions.CInterfaceError(Exception)>>signal (ExcHandling.st:254)
> > SystemExceptions.CInterfaceError class(Exception class)>>signal:
> (ExcHandling.st:161)
> > CFunctionDescriptor(CCallable)>>callInto: (CCallable.st:165)
> > NCWindow class>>primInitScr (NCurses.star#VFS.ZipFile/ncurses.st:1)
> > NCWindow class>>initscr (NCurses.star#VFS.ZipFile/ncurses.st:1360)
> > NCWindow class>>clock (NCurses.star#VFS.ZipFile/ncurses.st:2712)
> > UndefinedObject>>executeStatements (a String:1)
> > nil
> >
> >
> > libncurses is already installed in my system and I have no error at
> compile time.
> >
> > Someone has an idea ?
> >
> > Best regards
> >
> > Olivier
> >
> >
> _______________________________________________
> help-smalltalk mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/help-smalltalk
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.