hi all, i have a compled c file ... with output file as a.out ( or any other name ) But this file is executed only on giving # ./(filename) how do i convert it into a executable so that it executes only on giving the filename ( like in Windows as file.exe )
Windows has a pathetic way of doing things. And things don't way the same way as they work in GNU/Linux. So before you try out new things, remember to not compare things with how they happen in Windoze.
Now coming to the question you ask, set the path to the directory where your executable lies (you can compile files, so I guess you must be clever enough to do this).
But trust me, for reasons too fine-grained to get in here, it's better to use ./filename syntax for executing things.
Secondly, use the -o switch in gcc/g++ and name your compiled code. And again, compiled code _IS_ executable code. RTFM... chmod, gcc, g++
Regards,
Amol Hatwar.