Thread: Ncurses Lib

  1. #1
    C/C++ Learner & Lover
    Join Date
    Aug 2008
    Location
    Argentina
    Posts
    193

    Ncurses Lib

    Gcc is not recognising the ncurses.h file, how do I have to compile the program?

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    gcc knows no more than any other compiler about ncurses. You would have to install the ncurses (or similar) package to make gcc able to compile code that uses ncurses. What OS is this?

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Is ncurses installed on your machine? Or did you just read about it online and say "Sweet Jesus! I am going to use that!" Then proceed to attempt compiling code off the site that mentioned NCurses?

  4. #4
    C/C++ Learner & Lover
    Join Date
    Aug 2008
    Location
    Argentina
    Posts
    193
    That's why I'm asking what do I have to input when compiling, someone told me "gcc -lncurses foo.c -o foo" but it's not recognizing it neither..
    I'm on Ubuntu 8.04, I think the ncurses library is installed already

  5. #5
    C/C++ Learner & Lover
    Join Date
    Aug 2008
    Location
    Argentina
    Posts
    193
    Damn, I confused the package for running aps with the dev one..
    master5001, can you check my new fileserver code?

  6. #6
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Something like this:
    Code:
    sudo apt-get install build-essentials
    sudo apt-get install libncurses5-dev
    (I got that by googling "Install ncurses ubuntu", and found this forum: http://ubuntuforums.org/showthread.php?t=296224).

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  7. #7
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    You bet I can, lautarox. Is it posted on the other thread? If not, just PM it to me.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How customize Windowing in ncurses lib?
    By intmail in forum Linux Programming
    Replies: 4
    Last Post: 06-29-2009, 05:11 PM
  2. using VC6 link VC7 static lib error
    By George2 in forum C++ Programming
    Replies: 5
    Last Post: 06-29-2006, 10:58 PM
  3. Including lib in a lib
    By bibiteinfo in forum C++ Programming
    Replies: 0
    Last Post: 02-07-2006, 02:28 PM
  4. Making a LIB file from a DEF file for a DLL
    By JMPACS in forum C++ Programming
    Replies: 0
    Last Post: 08-02-2003, 08:19 PM
  5. help me using lib from Visual C++ 6
    By oskilian in forum Windows Programming
    Replies: 3
    Last Post: 10-11-2001, 11:28 AM