Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-30-2012, 12:08 AM   #1
LQ Newbie
Registered: Oct 2009
Posts: 4

Rep: Reputation: 0
How to use header file #include<conio.h> in fedora 17 using gcc

Dear Expert,
I try to use conio.h header file in c programming in fedora 17 using gcc compiler it does not recognize the conio.h. How to install it, i'm just a new learner.
Old 09-30-2012, 12:47 AM   #2
Registered: Jul 2008
Distribution: Ubuntu $LATESTVERSION
Posts: 168

Rep: Reputation: 67
Have you considered using curses.h instead of conio.h?
Quoting from Wikipedia:
conio.h is a C header file used in old MS-DOS compilers to create text user interfaces. It is not described in The C Programming Language book, and it is not part of the C standard library, ISO C nor is it defined by POSIX... Most C compilers that target UNIX and Linux do not have this header and do not supply the library functions.... It is common to include curses.h instead of conio.h, if a program is compiled on a non-DOS operating system.
3 members found this post helpful.
Old 10-01-2012, 12:56 PM   #3
LQ Newbie
Registered: Oct 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Thank for ur help, i'm just new to linux. I just try with that curses.h it work. i install the library with "yum install ncurses-devel" is this the correct library for curses.h
Old 10-01-2012, 02:33 PM   #4
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.4 + 50+ other Linux OS, for test only.
Posts: 17,027

Rep: Reputation: 3444Reputation: 3444Reputation: 3444Reputation: 3444Reputation: 3444Reputation: 3444Reputation: 3444Reputation: 3444Reputation: 3444Reputation: 3444Reputation: 3444
Yes. The command : rpm -ql ncurses-devel

.. will show that you now have : /usr/include/curses.h


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Does gcc with different version include some different default header files? cplus Programming 5 07-10-2011 05:09 AM
include header file utkarshrawat Programming 6 03-22-2011 11:28 AM
cant include libipq.h header file rohit83.ken Programming 3 04-04-2008 01:53 AM
unable to include header file.. nick021 Programming 2 05-05-2006 03:11 PM
header file to replace conio.h Digital Surgeon Programming 1 03-29-2006 08:40 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:32 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration