Making executabe files
Hai friends
i have developed an application in c language. Now I want to make an executable file for that. I don't know how to do....so please help me |
|
i don't want to make .exe file. i want to execute my program
using its name.. like vi.. my program name is 'lncur' . i want to run my program using command lncur. is there any way to do this |
Quote:
|
chmod 755 lncur
./lncur |
i want to use only' lncur' as a command.is there any way
|
Assuming your using gcc and it's a single file the command would be
gcc -Wall -o whatyouwanttonamethefile thenthesourcefile.c -Wall gives you very verbose compiling. You should always use it. -o tells the compiler the name you want to call your file So for example with Incur as the name I want to execute and Incur.c as the name of the file to compile I would do gcc -Wall -o Incur Incur.c Hope that helps. Zack |
in this case also i have to give ./lncur
i want to use only 'lncur' to run |
linux only searches for a command using the path environment. Since the directory where lncur is located is not in your path then with out the ./ you will see a command not found error. BTW ./ is a shortcut for current working directory.
To see your current path environment use the following command: echo $PATH You can add a directory to your users path environment via your /.bash_profile file like: PATH=$PATH:/data/myprogram To add the path for all users add the directory to the /etc/profile file. Of course you can always move the executable to a directory that is already in the path. |
Hmm -- tough question... it depends how it was developed. You might have to do a
Code:
qmake Code:
gcc main.c Code:
make |
sorry, i got a bit ahead of myself there -- i thought you were looking for compiling info.
All you have to do is go into one of the bin directories (me, i prefer /usr/local/bin), be root, and type [code] ln -s *path to your program* /usr/local/bin/lncur [code] This should do what you want... |
thank you sir ..it works....
|
All times are GMT -5. The time now is 02:15 AM. |