LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 08-29-2009, 07:28 PM   #1
Hi_This_is_Dev
Member
 
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254

Rep: Reputation: 18
Lightbulb C and C++ Under Linux


Hi,


I am familiar with C/C++ and have worked on Windows Platform. But I am finding it a little bit difficult in programming for Linux because I have no idea of as to what "include files" are available therein for Linux and what not which are found for C/C++ for Windows.


For example, these line of code would not work in Linux:

Code:
#include <conio.h>
#include <graphics.h>

and so wouldn't their related functions which I have been using so far in Windows.


So, can you suggest me how to find out what "include files" or "header files" are out there available to work with in gcc for Linux? Could you give me a link to a good online or pdf tutorial where I can get all this info?

However, I am going to google it now. But I think you guys have got great ideas!

Thanks!
 
Old 08-29-2009, 09:20 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,764

Rep: Reputation: 306Reputation: 306Reputation: 306Reputation: 306
The place to look for documentation on the compiler most commonly used (the gnu gcc/g++ compiler) is http://gnu.gcc.org/onlinedocs/.
Scroll down the the version of gcc you are using, and choose from PDF, Postscript, html, and tarball.
 
Old 08-30-2009, 12:29 AM   #3
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
conio.h is definitely a MS only thing. If you need functions that are in there, you can look at ncurses ; not sure if every function from conio is in there

don't know about graphics.h

You can run locate stdio.h to find where the standard include files are and next analyse that directory.

PS There is a dedicated programming section here at LQ. Useful for programming specific questions.

Last edited by Wim Sturkenboom; 08-30-2009 at 12:32 AM.
 
Old 08-30-2009, 05:29 AM   #4
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,176
Blog Entries: 4

Rep: Reputation: 429Reputation: 429Reputation: 429Reputation: 429Reputation: 429
Moved: This thread is more suitable in Programming and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 08-30-2009, 01:18 PM   #5
Hi_This_is_Dev
Member
 
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254

Original Poster
Rep: Reputation: 18
Thanks for the info. I am going to look at GCC online documentation now at http://gcc.gnu.org/onlinedocs/
 
Old 08-30-2009, 02:19 PM   #6
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
I think a more appropriate place to look is the glibc online reference. 99% of what I use when programming in C on Linux is covered there. The gcc, ld, and make infopages are also very useful for understanding how Linux programs and libraries are built. As far as graphics and terminal, you might want to look for documentation of ncurses, Qt, and GTK+.
Kevin Barry

Last edited by ta0kira; 08-30-2009 at 02:21 PM.
 
Old 08-31-2009, 12:24 AM   #7
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
These are basically *DOS* include's! It's extremely unlikely you'd ever see either of these headers in an actual "Windows" (e.g. Win32 GUI) program:

Quote:
#include <conio.h>
#include <graphics.h>
If you want console-mode programs (like conio.h) then "ncurses" is a great alternative to consider under Linux.

If you want a true GUI (for example, the kinds of things you might have done with Microsoft MFC), then look at Qt or GTK2+.

One other alternative to consider is SDL:

http://gamedevgeek.com/tutorials/get...rted-with-sdl/


Good luck .. PSM
 
Old 08-31-2009, 02:16 PM   #8
Hi_This_is_Dev
Member
 
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254

Original Poster
Rep: Reputation: 18
http://www.gnu.org/software/libc/manual/


Excellent resource! Thanks!


I installed qt but as I am not familiar with its functionality, I would like to get started with it.
 
  


Reply

Tags
files, gcc, header


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



All times are GMT -5. The time now is 11:16 PM.

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