Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

silencejinn

macrumors newbie
Original poster
Feb 26, 2005
2
0
hi, i just installed xcode on my pb, i try to compile a c code, it worked. but i do not know how to run that ".out" file on my terminal.
need help from all you guys.
thanks a lot
ps:any xcode learning website suggest?
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
do an ls -l to make sure it's executable (look for x in the user permissions). Assuming it is type ./<name of file>.out (you need the ./ as the current directory is not normally in your PATH). Note that it is normal to rename the compiled executable to not have the .out extension!

If the file is not executable do chmod u+x <name of file>
 

silencejinn

macrumors newbie
Original poster
Feb 26, 2005
2
0
still no good

the file is executable and i have the permission. but how to change the name?
i tried just use "a", it doesn't work. what should i do?
thanks
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
You seem very uncomfortable with the command line! Use the Finder to change the name, or type mv <full name> <new name> the full name includes all extensions (i.e. mv a.out mygreatprogram).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.