update executable file


 
Thread Tools Search this Thread
Top Forums Programming update executable file
# 1  
Old 10-18-2001
Question update executable file

Hi All,
Is it possible to update an executable file created using cc or gcc compiler.
ie., very clearly
If i create a C program and execute it and an executable file a.out is created.
but the run time for the execution is around 30 minutes.
Is it possible to update that executable, if some small changes had been made to source code.
since the compiler takes 30 min. again to get the updated result.

I am not an expert in C. but this seems, hitting my mind for a long time...
Is there any way to achieve this or this is an Impossible task.

Thanks in Advance,
Anent
# 2  
Old 10-18-2001
You cannot overwrite a running executable.
You will trash the running program.

You could compile your C code...
gcc myfile.c

...then...
mv a.out newprog

...then run...
newprog

...then edit and compile your C code...
gcc myfile.c

...a.out will be created without trashing
the running program.
# 3  
Old 10-19-2001
Another method ...

Try this:

gcc source.c -o ProgramName

I use this command in Sun OS without any problem.
# 4  
Old 10-19-2001
Thanks rwb & MacMonster,
I want to clear out a little bit.
I have my executable file ready. and if i make changes in the source code and again if i compile the code. it takes the same time for compiling.

what i need is : the already available executable should be updated without overwriting with the executable created with the same name.

ie.,
gcc test.c -o myprog
o/p : myprog - executable file
if i run it again, - after small modification
gcc test.c -o myprog
o/p : myprog - exe file - but same compiling time.
but the modification made to the source is a little bit.

Idea:
Case 1; If i create some modules of C source codes.and if i modify the code to any one of the module.
How can i reduce my runtime of the exe file creation.
Case 2; If it is a single module.. then.

any inputs are appreciated.
Anent
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Making file executable

Hi guys, i'm trying to make a file called 'run-all-tests' executable but it is not letting me for some reason. I am presented with the following error: chmod: cannot access `./run-tests': No such file or directory Basically i have a folder called ex3 and within that there are task folders:... (11 Replies)
Discussion started by: Shyamz1
11 Replies

2. Shell Programming and Scripting

unix executable file

Hi - How can I find out under sh whitch file is an unix executable file? Need it for an software inventory. Thanks in advance. Regards - Lazybaer (6 Replies)
Discussion started by: lazybaer
6 Replies

3. Programming

Executable file in C

Hi all, I have modified a C file and executed it. While executing the executable file for that C file, it shows à is cannot be printed. I have given isprint(à) to test it. When I copy the old executable file and execute it it shows it can be printed. Then I retain the C code back and executed it... (1 Reply)
Discussion started by: sivakumar.rj
1 Replies

4. Shell Programming and Scripting

executable file

Hi, I want to know that how can i read the content of a .exe file?? Thanks (1 Reply)
Discussion started by: ss_ss
1 Replies

5. UNIX for Advanced & Expert Users

How can i read a non text file in unix - ELF-64 executable object file - IA64

The binary file is ELF-64 executable object file - IA64. How i know that the source is Is there any comamnd in unix i can read these kind of files or use a thirty party software? Thanks for your help (8 Replies)
Discussion started by: alexcol
8 Replies

6. Programming

Running an executable file

I've created a c program and compiled it with gcc, in unix. The file name is abc.c and it is run by typing the command ./abc I have another program which creates a child process, and I need this abc program to run on that child process. I've tried execvp(), but it doesn't work. How can I run... (2 Replies)
Discussion started by: sdsd
2 Replies

7. Shell Programming and Scripting

Executable file

Hi everybody: I have strange problem. I have compiled a source code and created an executable file. This file I can use it into my PC, but when I copy this executable to my laptop this one doesn't work and the system tell me: bash: ./sbdart_unix: cannot execute binary file Somebody can... (3 Replies)
Discussion started by: tonet
3 Replies

8. UNIX for Dummies Questions & Answers

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! (7 Replies)
Discussion started by: compbug
7 Replies

9. UNIX for Dummies Questions & Answers

file with executable permission

Hi All, How can we execute a Unix file (shell script), which had given "Execute" permission using chmod +x file1 If i want to execute that file. prompt>./file1 Hello How can i make the file permission or something else. such that i can execute it using prompt>file1 Hello Note :... (9 Replies)
Discussion started by: anent
9 Replies

10. UNIX for Dummies Questions & Answers

Newbie question about difference between executable file and ordinary file

Hi, I am newbie in unix and just started learning it. I want to know what is the difference between an executable file and a file (say text file). How to create executable file? What is the extension for that? How to differentiate ? How does it get executed? Thanks (1 Reply)
Discussion started by: Balaji
1 Replies
Login or Register to Ask a Question