LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   How to execute c++ program (https://www.linuxquestions.org/questions/programming-9/how-to-execute-c-program-331844/)

Daz_Man2803 06-09-2005 08:33 AM

How to execute c++ program
 
hi there, i have wrote a simple hello world program and compiled it using g++ using the following command:
Code:

g++ helloWorld.cpp -o helloWorld
i was just wondering how i execute this program now, i have a file called helloWorld as expected but i dont know how to execute it in the terminal.:newbie:

trevelluk 06-09-2005 08:36 AM

./helloWorld

The ./ tells the system that the file to execute is in the current directory.

Daz_Man2803 06-09-2005 08:46 AM

thanks for the super fast reply! can you recommend a good IDE for C++. i have installed eclipse and anjuta but they dont seem to want to work for me. I use VS.net in windowz but want to try and use linux for my programming.

trevelluk 06-09-2005 08:52 AM

KDevelop is very popular, and is distributed with KDE. It may already be installed, and if not you can probably install it using apt (Ubuntu does use that, right?)

Daz_Man2803 06-09-2005 08:54 AM

Ubuntu uses apt but i am using gnome and not kde, will that be a problem?

trevelluk 06-09-2005 09:02 AM

It shouldn't be. You can definitely run KDE programs in Gnome (and vice-versa) if all of the relevant libraries are installed. As I understand it (and please bear in mind that I use SuSE, which doesn't use APT), then APT should automatically handle this for you, and all you'll have to do is tell your system to install KDevelop. I'm not sure what the exact command would be, but I'd guess something along the lines of apt-get kdevelop

Daz_Man2803 06-09-2005 09:03 AM

Thanks for the help!

lowpro2k3 06-09-2005 09:22 AM

vim is my favorite IDE ;)

enemorales 06-09-2005 11:28 AM

You can also use Kate, that comes with KDE also. It is the default editor used by Kdevelop, I think. I find it very good for small projects.

PS: Actually I'm not sure that Kdevelop comes by default with KDE. It didn't with mine, but I use another linux distribution: Gentoo.


All times are GMT -5. The time now is 01:02 PM.