![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How can i read a non text file in unix - ELF-64 executable object file - IA64 | alexcol | UNIX for Advanced & Expert Users | 8 | 11-07-2008 08:56 AM |
| What's The Easiest Route To Creating A Unix Executable File for Terminal? | unimachead | OS X (Apple) | 10 | 11-03-2008 12:40 PM |
| Executable file | tonet | Shell Programming and Scripting | 3 | 01-17-2008 12:03 PM |
| problem in creating executable for a client program | konas | High Level Programming | 2 | 11-17-2006 02:09 PM |
| Newbie question about difference between executable file and ordinary file | Balaji | UNIX for Dummies Questions & Answers | 1 | 11-29-2000 06:49 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
creating executable for every C file
hello Folks,
once we compile any C code on Linux, we run the code using "./a.out".. but can we have an executable for every program so that we can run the code directly without compiling the code every time. just run the executable and get the output! Thanks! |
|
||||
|
You could do. Except that normally non-trival C programs are more than one source file.
You could write a C interpretor, but there is no real demand for them. The advantages you get from using C are mainly because it's a compiled language. I rarely call my programs a.out, it would get far too confusing trying to remember which one did what. |
|
||||
|
I may be missing the point on your question but C is a compiled language.
To run it you have to: (a) compile the C source into object files (b) link the object files with libraries to produce the executable once you have done that you can run the executable as many times as you like, and you can call it whatever name you like. It is also compiled specific to the computer's architecture, so you can't expect 386 code to run natively on an UltraSparc. Similarly it is operating system dependent. |
|
||||
|
@porter
sorry, I was not specific in asking the question... my question was to renaming the executable to the C code name which can be done by "mv" ....
so , you missed a point about this.. Thanks Man! |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Tags |
| linux |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|