On 8 Sep 2005, at 06:56, Frank Heckenbach wrote:
By the way. Why don`t you upload the bindings to the gnu-pascal site? Some little webspace for gpc bindings/stuff would be great. That`s also what fpc is doing.
Yes, we have plenty of web space for contributions. If you (Willett) would like to get an account (ssh/scp/sftp), please mail me privately. Alternative, you can upload the package through the upload form (under "Downloads" ;-) on the web site.
Frank
Frank:
Thanks for the invitation. I will. First, I am working on a more significant example program that makes intensive use of the ncurses library.... both as a more thorough test and as an example. Also odds and ends such as the cWordBool type that I'm hoping will be included in your next compiler release, and hoping to hear from some non-MacOSX people as to whether or not they need to adjust types, this would make my docs more generic. I'd do it as a "download".
Karim:
Could you do the following greps, which should yield something like the "typedef" on the following line. You may need to adjust for your directory, possibly not /usr/include :
iceland:~ willett$ grep chtype; /usr/include/curses.h typedef unsigned long chtype;
Same for: grep define\ NCURSES_ATTR_SHIFT grep NCURSES_BOOL;
or better (but more bother for you), run "configure" on the ncurses source, and send me the file "config.cache"
Adriaan or Frank:
My documentation is oversimplified in linking. It now says only:
"To insure the ncurses.pas interface is available, compile it with: gp ncurses.pas (the code contains {$L ncurses }, otherwise the compile line would require -lncurses)"
But the problem Karim encountered shows my doc is not enough on some non-OSX systems. I'm afraid I don't understand the diversity of library arrangments (nor even the linking mechanism) well enough to offer generic advice across gpc systems. I've made an ill-informed stab in the dark, below. Could I ask one of you to edit it? Then I'll copy it into the ncurses docs.
PROPOSED ADDITION TO GPC NCURSES DOCS, PLEASE EDIT:
To insure the ncurses.pas interface is available, compile it with: gp ncurses.pas (the code contains {$L ncurses }, otherwise the compile line would require -lncurses)"
When you compile your own programs, you must also EITHER include {$L ncurses } in the source code, or include -lncurses on the "gp" command line. Try just the above, if it works, skip the rest of this section. If the above does not work on your system, additional steps are needed to find the ncurses library at link and/ or load time.
For example, on one NetBSD system, the above {$L ncurses} alone produces an error like: 'Shared object "libncurses.so.5" not found'
You may need to locate the file "libncurses.so.5" and PLEASE ADD HERE A GENERIC DESCRIPTION OF WHAT IS BEING DONE.
For example, you might copy libncurses.so.5 from /usr/pkg/lib to / usr/lib.
Also, the -L option only refers to link-time searching. For runtime searching, one often needs an additional option. Under Linux this is the following, added to the "gp" command line each time you compile a program using ncurses: (OR/AND WHEN COMPILING NCURSES.PAS??) -Wl,-R/usr/pkg/lib (one single option, without spaces)
PLEASE FIX MY IGNORANCE IN THE ABOVE, THEN I'LL CLIP IT INTO DOC
Thanks to all,
Willett Kempton