Simon Strandgaard wrote:

> I am wrapping ncursesw for ruby. 
> In ncurses.h it has declared the following variable:
> extern int COLORS;
> 
> I would like to access COLORS from ruby (if possible).
> I have tried extern 'int COLORS' but without luck.

Does this work?

module MyLib
    extend DL::Importable
    dlload "ncurses.so"

    Colors = symbol "COLORS"
end