Can't execute using ./ in bash anymore
Hi I'm using Ubuntu 9.04 and I've encountered a very odd error. I sat down this evening do to an assignment and went to run a C++ executable compiled using g++ in the normal way ./programName and all I get is 'No such file/directory 'programName'. I've tried this with all manner of executable from various programs I've made over the years and it won't work for anything. I'm sure it's something rather minor that's causing the error, I can't figure it out though. Since I'm meant to be finishing this assignment tonight it's rather frustrating, I'm using emacs over an SSH connection to finish it off on a computer that works now properly now, but working on it locally, and fixing this problem would be really really great.
Thanks, I guess this is some sort of punishment for trying to finish work the day before it's due :-( |
Quote:
Code:
$ pwd Code:
$ ls Code:
$ ls -la (look for permission bits including 'x' for the user you are) |
To compile
g++ myprogram.cc This will create the a.out file and to execute this file ./a.out OR g++ -o myprogram myprogram.cc ./myprogram |
All times are GMT -5. The time now is 04:09 AM. |