12-19-2005
Quote:
Originally Posted by rraajjiibb
Sorry for asking a very basic question.
How do i compile my c codes in UNIX.
That is how do i know whether any c compiler is there in my system?
If nothing is present where from do i get one and load into my system?
To find out what is installed simply type the command 'cc' on a terminal window. If it is installed, you will probably get a message which reads '
no input file.' If the package is not present, you will get something like '
optional package not installed.'
If the Compiler Collection (cc) packages are not installed, then the easier way is to install the GNU cc package (gcc). You can download it at gcc.gnu.org or one of its mirrors.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Suppose I have a script which is monitoring a directory
whenever a file drops in that directory,it sends alert
say I want to write a return code for the above script
which on successful execution of script gives a return value
Based on return code , I want to do initiate some jobs in other... (1 Reply)
Discussion started by: abhib45
1 Replies
2. Programming
for the pseudocode "parbegin(p1,p2)"
how to write codes?
p1,p2 are threads function.
void p1()
{
...
}
void p2()
{
...
}
void main()
{
parbegin(p1,p2);
} (2 Replies)
Discussion started by: zhshqzyc
2 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I know how to read a return code after executing a single command.
"echo $?". But I do not know how to sum the return code for a group of commands.
If I string 3 commands together and I do an echo $? all I get is the retunr code for the last command. Example below:
... (3 Replies)
Discussion started by: z1tt45uuprs7
3 Replies
4. UNIX for Dummies Questions & Answers
Hi Thanks to one who helped me to create a new thread
I am so new to unix and trying to learn the stuff
Thanks for all the help I am getting here
I wanted to execute if loop like
if( x=y || (x=z && x=q))
{
some statements
}
Can I get help how to do write the if loop in unix shell... (5 Replies)
Discussion started by: pinky
5 Replies
5. Shell Programming and Scripting
Hi
I have a directory where sometimes a file will come (in a name format say file001.txt).
I want to run a job (.ksh file) as soon as a new file comes into the directory.
How can I write a shell script which will run in the background and monitor arrival of new file in the directory?
... (11 Replies)
Discussion started by: sbasak
11 Replies
6. Shell Programming and Scripting
unix script must do the fiollowing
open a file containing comma delimited records
> each record contains 10 fields
> removes the 2nd field and use that same field containing fields 2 to 10
the original record after fprocessing should containing fields 1 and 3
a new erecord must be... (10 Replies)
Discussion started by: dwightja
10 Replies
7. UNIX and Linux Applications
Hi Friends,
I need your help in understanding this: :rolleyes:
I want to print the error numbers returned by the system calls (not the actual integers but the strings that they match to). The error numbers like EACCESS, ENOMEM, ENOENT etc ...
For eg:
returnCode = open(somefile,... (2 Replies)
Discussion started by: vijaya2006
2 Replies
8. IP Networking
Hi,
We have smb client running on two of the linux boxes and smb server on another linux system. During a backup operation which uses smb, read of a file was allowed while write to the same file was going on.Also simultaneous writes to the same file were allowed.Following are the settings in the... (1 Reply)
Discussion started by: swatidas11
1 Replies
9. Shell Programming and Scripting
Could someone please correctly tell the codes to use on Unix operating systems to produce the below diacritics:
A
Ā = Unicode Character 'LATIN CAPITAL LETTER A WITH MACRON' (U+0100)
a
ā = Unicode Character 'LATIN SMALL LETTER A WITH MACRON' (U+0101)
D
Ḍ = Unicode Character... (1 Reply)
Discussion started by: Krishna Birth
1 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
We have a HTML source which will be processed using a informatica workflow. In between these two we have a Unix script which transforms the file.
We are getting an error from past week in the informatica saying invalid format, because the file has unused html reference (0-8,14-31 etc)... (2 Replies)
Discussion started by: karthik adiga
2 Replies
LEARN ABOUT NETBSD
compile_et
COMPILE_ET(1) General Commands Manual COMPILE_ET(1)
NAME
compile_et - error table compiler
SYNOPSIS
compile_et file
DESCRIPTION
Compile_et converts a table listing error-code names and associated messages into a C source file suitable for use with the com_err(3)
library.
The source file name must end with a suffix of ``.et''; the file consists of a declaration supplying the name (up to four characters long)
of the error-code table:
error_table name
followed by up to 256 entries of the form:
error_code name, " string "
and a final
end
to indicate the end of the table.
The name of the table is used to construct the name of a subroutine initialize_XXXX_error_table which must be called in order for the
com_err library to recognize the error table.
The various error codes defined are assigned sequentially increasing numbers (starting with a large number computed as a hash function of
the name of the table); thus for compatibility it is suggested that new codes be added only to the end of an existing table, and that no
codes be removed from tables.
The names defined in the table are placed into a C header file with preprocessor directives defining them as integer constants of up to 32
bits in magnitude.
A C source file is also generated which should be compiled and linked with the object files which reference these error codes; it contains
the text of the messages and the initialization subroutine. Both C files have names derived from that of the original source file, with
the ``.et'' suffix replaced by ``.c'' and ``.h''.
A ``#'' in the source file is treated as a comment character, and all remaining text to the end of the source line will be ignored.
BUGS
Since the original compile_et uses a very simple parser based on yacc(1), and this current version of compile_et uses an awk/sed combina-
tion of scripts, its error recovery leaves much to be desired.
SEE ALSO
com_err (3).
Ken Raeburn, "A Common Error Description Library for UNIX".
SIPB 30 Mar 1998 COMPILE_ET(1)