PDA

View Full Version : Help on running a programme on ubuntu.



mczi
August 31st, 2005, 11:53 PM
Thanks for the help on my last trouble but now that I have that I can compile on ubuntu I can't run the programmes after compiling them. I do not know if I'm wrong but after compiling I type the name of the file at the command prompt but it says 'command not found'.

I'm using 'C'.
This is the final step and help will be greatly appreciated!!! ](*,)

invalid
August 31st, 2005, 11:57 PM
to run a compiled program you type:

./program

If for some reason this is not permitted, you need to
chmod +x program
but it should work with the first command

Cheers,
Cb

deathseeker25
September 1st, 2005, 12:25 AM
to run a compiled program you type:

./program

If for some reason this is not permitted, you need to
chmod +x program
but it should work with the first command

Cheers,
Cb

Sure use this and i think you'll never have problems. I never had problems with my own programs and i use these commands.

Stay well []

varunus
September 1st, 2005, 03:25 AM
Thanks for the help on my last trouble but now that I have that I can compile on ubuntu I can't run the programmes after compiling them. I do not know if I'm wrong but after compiling I type the name of the file at the command prompt but it says 'command not found'.

I'm using 'C'.
This is the final step and help will be greatly appreciated!!! ](*,)

This is because linux won't run programs in any directory; it'll only run programs from directory's in your PATH variable. To make it run a program from the current directory, type:


./programname

and press enter.