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

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

put on hold as off-topic by muru, Fabby, Eric Carvalho, A.B., Pilot6 2 days ago

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This describes a problem that can't be reproduced that seemingly went away on its own or was only relevant to a very specific period of time. It's off-topic as it's unlikely to help future readers." – muru, A.B.
If this question can be reworded to fit the rules in the help center, please edit the question.

    
possible duplicate of graphics.h, conio.h and dos.h not working in gcc –  muru Oct 7 '14 at 9:29
    
possible duplicate of Why can't I use conio.h or ncurses.h? –  Eliah Kagan Oct 7 '14 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

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