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 |
./helloWorld
The ./ tells the system that the file to execute is in the current directory. |
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.
|
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?)
|
Ubuntu uses apt but i am using gnome and not kde, will that be a problem?
|
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
|
Thanks for the help!
|
vim is my favorite IDE ;)
|
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. |