creating executable for every C file

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers creating executable for every C file
# 8  
Old 09-30-2007
I would recommend using "-o" option to specify the name of the executable,
so for example,

(a) if you have a makefile that only completed half of it's tasks, you could continue where you left off without wondering what a.out referred to

(b) if you are creating a shared library, the library often carries and internal representation of it's name, in ELF terms, the SO_NAME field, if the -soname field is not specified it is derived from the output file name, so the shared library may think it's supposed to be "a.out".

(c) in a Makefile, this can be standardised as "-o $@"
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. OS X (Apple)

Creating An Executable On The Fly...

Hi all... Had an idea tonight which could really enhance shell scripting for me. Yes I am aware there could be difficulties but...... Creating a C script inside the shell script to do a task, (a simple text print to stdout in this example), compiling it on the fly, making sure it is... (4 Replies)
Discussion started by: wisecracker
4 Replies

2. Shell Programming and Scripting

Creating executable script--please help

Hi group, I am very beginner in shell scripting and self learning. I am trying to create and executable script to run awk from user defined variables. e.g. suppose from a given file I want to delete some rows or some columns We need to repeat this process for many files. Thus I was... (4 Replies)
Discussion started by: smitra
4 Replies

3. UNIX Desktop Questions & Answers

creating an executable file from shell scripts

Hi Friends, I have a shell script which does some operations etc, would it be possible to create an executable file out from this shell script? meaning the executable file is not editable, thus the source code will not be visible to other users for copyright reasons. Please help, thanks! (1 Reply)
Discussion started by: kokoro
1 Replies

4. 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

5. 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

6. 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

7. OS X (Apple)

What's The Easiest Route To Creating A Unix Executable File for Terminal?

I've seen the executable open in the application OmniOutliner, can I create an executable with this app? I'd like to be able to create the unix executable and insert it into terminal, but I'm not sure if the Omni app will allow me to create it. Any one have any ideas or possibly familiar with... (10 Replies)
Discussion started by: unimachead
10 Replies

8. 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

9. Programming

problem in creating executable for a client program

Hi, I am trying to run simple client server c program in unix.At the compling stage server is creating an executable but the client is not. below is the link to the source codes: ... (2 Replies)
Discussion started by: konas
2 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
run(1F) 							   FMLI Commands							   run(1F)

run - run an executable SYNOPSIS
run [ -s] [-e] [-n] [-t string] program DESCRIPTION
The run command runs program, using the PATH variable to find it. By default, when program has completed, the user is prompted (Press ENTER to continue:), before being returned to FMLI. The argument program is a system executable followed by its options (if any). OPTIONS
The following options are supported: -e If -e is specified, the user will be prompted before returning to FMLI only if there is an error condition -n If -n is specified, the user will never be prompted before returning to FMLI (useful for programs like vi, in which the user must do some specific action to exit in the first place). -s The -s option means "silent", implying that the screen will not have to be repainted when program has completed. Note that the -s option should only be used when program does not write to the terminal. In addition, when -s is used, program cannot be interrupted, even if it recognizes interrupts. -tstring If -t is specified, string is the name this process will have in the pop-up menu generated by the frm-list command. This feature requires the executable facesuspend (see face(1)) to suspend the process and return to the FMLI appli- cation. EXAMPLES
Example 1: Sample output of run command Here is a menu that uses run: menu="Edit special System files" name="Password file" action=`run -e vi /etc/passwd` name="Group file" action=`run -e vi /etc/group` name="My .profile" action=`run -n vi $HOME/.profile` ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
face(1), attributes(5) SunOS 5.10 17 Nov 1999 run(1F)