Compiling Curses in OS X for Perl

Discussion in 'Perl Misc' started by Pacman, Sep 17, 2003.

  1. Pacman

    Pacman Guest

    A note to anyone wanting to get Curses to compile under OS X 10.2.6.
    I had to make some changes to the standard c-config.h hints file, the
    old 'darwin' one does not work due to conflicts between some perl
    definitions and curses.h definitions namely:

    instr
    bool
    FIELD

    here's the c-config.h file I altered:

    /* Hint file for the darwin platform.
    *
    * If this configuration doesn't work, look at the file "c-none.h"
    * for how to set the configuration options.
    */


    #include <curses.h>

    #ifdef C_PANELSUPPORT
    #include <panel.h>
    #endif

    #ifdef C_MENUSUPPORT
    #include <menu.h>
    #endif

    /* OK this is hackish, but it solves the problem. */
    #ifdef C_FORMSUPPORT
    #include "/usr/include/form.h"
    #endif

    /* FIX: OS X longname only takes 0 args now */
    #define C_LONGNAME
    #define C_LONG0ARGS
    #undef C_LONG2ARGS

    /* FIX: OS X touchline is now 3 args */
    #define C_TOUCHLINE
    #define C_TOUCH3ARGS
    #undef C_TOUCH4ARGS

    /* These both get defined in curses.h and then redefined later in
    Perl.h */
    #undef instr
    #undef bool

    P-

    --
    #############
    Imagination is more important than knowledge - A. Einstein
     
    Pacman, Sep 17, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jean-Paul Calderone
    Replies:
    2
    Views:
    467
    Joel Hedlund
    Feb 9, 2006
  2. Replies:
    4
    Views:
    349
  3. Replies:
    4
    Views:
    113
  4. Mark Seger

    Compiling perl? perl??

    Mark Seger, Nov 30, 2006, in forum: Perl Misc
    Replies:
    3
    Views:
    132
  5. PerlFAQ Server

    FAQ 3.13 How can I use curses with Perl?

    PerlFAQ Server, Mar 3, 2011, in forum: Perl Misc
    Replies:
    0
    Views:
    223
    PerlFAQ Server
    Mar 3, 2011
Loading...

Share This Page