Hi, I'm glad you got most of the way there!
I think there are two things missing:
First, make sure you have execute permissions on the executable file.
chmod a+x test.o
Next, run it like this:
./test.o
I don't know why Geany isn't running it correctly, but perhaps the above will help. (I use the command line myself.)
Good luck!
Hi,thanks for the reply.
I'm not well versed in linux, but anyway this is what i tried:
/media/mmc1/docs/cisp 360 # chmod a+x test.o
/media/mmc1/docs/cisp 360 # /test.o
/bin/sh: /test.o: not found
/media/mmc1/docs/cisp 360 # ls
gcc-3.4.install test.c
geany_run_script.sh test.o
test
/media/mmc1/docs/cisp 360 #
There is a '.' before the /test.o
In linux, if you want to execute a file that isn't in the path you need to prefix it with './' (dot slash). It's a safety precaution I believe.
Also, if ./test.o doesn't work, try it with the 'test' file; I'm not sure how Geany made things.
There is a '.' before the /test.o
In linux, if you want to execute a file that isn't in the path you need to prefix it with './' (dot slash). It's a safety precaution I believe.
Also, if ./test.o doesn't work, try it with the 'test' file; I'm not sure how Geany made things.
I've tried every combination, ./test.o ./test test test.o
I always get the error: /bin/sh: ./test(.o) permission denied
any ideas about what could be going on?
I've also tried this as root. Not sure why it wont let me run it.
Type "ls -l" (no quotes) in that folder to see if you have executable permissions. The file should look something like this:
-rw-rw-r-x 1 ebrulon cbssw 25 Apr 15 11:08 test.o
the 'x' in the '-rw-rw-r-x' means that you have executable permissions. It could also look something like '-rwxrwxrwx' the 'x's are executable permissions. (r and w are read and write.)
Also, are there any files that end with '.out' in the folder? The executable could have that extension.
Type "ls -l" (no quotes) in that folder to see if you have executable permissions. The file should look something like this:
-rw-rw-r-x 1 ebrulon cbssw 25 Apr 15 11:08 test.o
the 'x' in the '-rw-rw-r-x' means that you have executable permissions. It could also look something like '-rwxrwxrwx' the 'x's are executable permissions. (r and w are read and write.)
Also, are there any files that end with '.out' in the folder? The executable could have that extension.
Bruce
thanks for the response. Trying the chmod command and the ls -l to check for change in execution permissions. The permissions do not change, it stays at -rw-r--r-- for all files in that folder.
tried it for test and test.o
I appreciate your help, any other ideas? another way to change permissions? looks like that's the problem.
no files ending with .out
To change permissions you must own the file. When you do 'ls -l' does it say 'user' or 'root' as owner. In the above example 'ebrulon' is me (the owner) and 'cbssw' is the group I am in. Since it is best to build files as user, do this:
1) make sure you are root
2) cd to the parent of your project folder.
3) chown -R user <name-of-your-project-folder>
This should recursively CHange the OWNership of the folder and all its contents to user.
THEN try chmod a-x again.
The command chgrp does the same thing for the file's group.
ok, so thanks to both of you for starters. I was saving to my mmc card. I tried to save to the mydocs folder of the OS, and I do have permissions in there, and am able to run it.
Is it impossible to run such a file from a storage partition such as my mmc1 card?