How in the world...

The geek forum. PHP, Perl, HTML, hardware questions etc.. it's all in here. Got a techie question? We'll sort you out. Ask your questions or post a link to your own site here!

How in the world...

Postby Icarus » Wed Jul 21, 2004 3:22 pm

do you execute the programs you write in g++? It compiles, it creates the application, everything is fine until you try to run it. In bash, it says <program name>: command not found, or some such, and in the gui, I have no idea what program to use. Please, anyone? To those what don't know, this is on Linux.
The Forsworn War of 34

††
User avatar
Icarus
 
Posts: 1477
Joined: Sun Nov 09, 2003 5:00 am
Location: 34

Postby Mithrandir » Fri Jul 23, 2004 6:58 am

Well, when you first compile the program, it should spit out a file (like a.out). To execute, you sometimes have to tell it the complete path. You can use "dot slash" to say it's in the current directory. So it might look something like:
./a.out

If that doesn't work, you may have to make it executable, by using the chmod command:
chmod 700 a.out

This is all assuming the filename is a.out, of course. Let us know if it doesn't work.
User avatar
Mithrandir
 
Posts: 11071
Joined: Fri Jun 27, 2003 12:00 pm
Location: You will be baked. And then there will be cake.

Postby Icarus » Tue Jul 27, 2004 3:17 pm

Thank you, sir. I'll keep that in mind.
The Forsworn War of 34

††
User avatar
Icarus
 
Posts: 1477
Joined: Sun Nov 09, 2003 5:00 am
Location: 34


Return to Computing and Links

Who is online

Users browsing this forum: No registered users and 224 guests