Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I tried to compile my .cpp using g++. I wrote this in the terminal:

g++ Documents/cpp/demo.cpp -o Documents/cpp/demo

I had included conio.h, but somehow it does not recognise it and gives an error. Otherwise, a simple hello world program using stdio.h works fine.

I wanted to ask how I can find the header files which are available (they would be stored somewhere, right?). Is there any other software which has a GUI (like the Borland compilers on Windows) and can handle things well?

Thank you in advance!

share|improve this question
    
possible duplicate of graphics.h, conio.h and dos.h not working in gcc –  muru Oct 7 at 9:29
    
possible duplicate of Why can't I use conio.h or ncurses.h? –  Eliah Kagan Oct 7 at 10:06

1 Answer 1

I think you need to add

-I<path-to-conio.h>

If conio.h is your own header in the current directory, then this would be

-I.

for library headers, it is usually

-I/usr/include

Once you get more experienced with these things, also look into pkg-config, which knows about which options to use for which libraries.

As for a GUI, you might want to look into Code::Blocks, which is supposedly very good. Another one is Anjuta, which is part of Gnome. Both can be found in the software center.

share|improve this answer
    
Thank you very much Timo. However I have started using Wine for all the c++ thingie. Once, I get hold of the standardised c++ version for the ubuntu, I'll come back to work directly in ubuntu. –  Naveen Venkat Mar 18 '13 at 6:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.