On Saturday, 19 April 2014 at 12:06:58 UTC, FreeSlave wrote:
I use
ldc2 main.d -L-lcurses
or
dmd main.d -L-lcurses
and following source code:
import std.stdio;
extern(C) int tgetnum(const(char) *id);
int main()
{
writeln(tgetnum("li"));
return 0;
}
Note that you don't need to apply t
On Saturday, 19 April 2014 at 10:39:43 UTC, Adam D. Ruppe wrote:
Blargh, I don't know teh ldc switch for it :(
Try adding pragma(lib, "curses"); (or ncurses) to your file
with main in it, i think ldc supports that.
pragma(lib, "curses");
extern(C):
int tgetnum(const(char) *capname);
hmm
On Saturday, 19 April 2014 at 09:59:39 UTC, Adam D. Ruppe wrote:
Try adding -lncurses or -lcurses to the command line. tgetnum
is found in the curses library which isn't linked in
automatically by default.
Error: unrecognized switch '-lcurses'
Error: unrecognized switch '-lncurses'
:((
I want use tgetnum for get terminal size
http://www.mkssoftware.com/docs/man3/curs_termcap.3.asp
extern(C):
int tgetnum(const(char) *capname);
calling a method from main
writeln(tgetnum(toStringz("li")));
I receive an error message
Undefined symbols for architecture x86_64:
"_tgetnum", refer