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 > _______________________________________________ help-smalltalk mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-smalltalk
