cant compile on linux system.cant compile on cant compile onlinux system.

N

Nagaraj

hi all,
I have simple basic c++ program "hello world" which i cant compile on
linux system. I have given extension as .C. please tell me how to
compile C++ programs on Linux.
 
L

Lionel B

hi all,
I have simple basic c++ program "hello world" which i cant compile on
linux system. I have given extension as .C. please tell me how to
compile C++ programs on Linux.

If your program file is helloworld.C (assuming you have the GNU
compiler gcc installed, which you hopefully will) try:

g++ helloworld.C -o helloworld

then run the binary with:

../helloworld
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top