[Gambas-user] ncurses - macro is not found

Benoît Minisini gambas at ...1...
Wed Mar 2 21:21:43 CET 2011


> I do not have that much idea of how that works under C, so that's why I
> ask here.
> 
> In the ncurses library, there are macros. One of them is needed to get
> the dimensions of the "window". But when I define it
> 
> EXTERN getmaxyx(...
> 
> when my program starts, there is merely the error "cannot find symbol
> getmaxyx in library ncurses".
> 
> So what can I do here?
> 
> Regards
> Rolf
> 

A macro is not a function. It is some code replaced by some other code at 
compilation time. The "getmaxyx" identifier does not exist in the executable.

You must read the C header file to see what the getmaxyx() macro actually 
does.

The gcc compiler has the "-E" option that can help you, by writing to the 
standard output the real code that will be compiled once all macros have been 
expanded.

Regards,

-- 
Benoît Minisini




More information about the User mailing list