Doubts About C Compiler In Unix/linux


 
Thread Tools Search this Thread
Top Forums Programming Doubts About C Compiler In Unix/linux
# 1  
Old 09-05-2005
Doubts About C Compiler In Unix/linux

As all of you know whenever a program "say a.c" is complied in linux using the gcc or the cc compiler..it shows the list of errors ( if the program contains any).. i want to modify the compier script so as to list the no of errors only and not the description about the error..like" parse error " " missing ("
..... instead i want the compiler to show me " 2 errors "....
how can i do that..can i edit the script..firstly can i view the script......if any one knows the answr do reply to my id
thanx
vrs
# 2  
Old 09-13-2005
cc and gcc are exectuable images, not scripts. You can create makefiles - scripts that tell cc or gcc how to compile and link.

Generally what you are asking doesn't make a lot of sense to me because one single error in syntax or datatype can generate three of four errors from the compiler. Or 15.
Likewise, fixing one problem can remove dozens of errors.

This is a start. Some errors generate sever lines of message text. If you want syntax errors and no link errors try like this:
Code:
echo "`gcc -Wall -c myfile.c  2>err.lis; cat err.lis | wc -l` errors"

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Linux kernel modules makefiles doubts

This query is regarding the makefiles of linux kernel modules. I saw at some sites on net it is suggesting to include the following path: KERNEL_SOURCE := /usr/src/linux... while at some places it is askibg to include /lib/modules path: KERNEL_SOURCE := /lib/modules/2.6.27-7-generic/build... (0 Replies)
Discussion started by: rupeshkp728
0 Replies

2. Shell Programming and Scripting

Few doubts on Linux scripting

1) I have to create 3 scripts which create different output files. Script one creates datafiles, script2 creates control files and script3 creates flg files. The business wants the same timestamp to be attached to all the files created by these scripts. Script1- Create data files - Data files... (2 Replies)
Discussion started by: Maya_Pillai
2 Replies

3. Solaris

Unix scripting doubts

i hav a file like this -rwxr-xr-x 1 root controlm 4141 Nov 13 2006 /opt/scripts/prod/fvaauditlos.ksh -rwxr-xr-x 1 root controlm 3958 Nov 13 2006 /opt/scripts/prod/fvaexpchbk1.ksh -rwxr-xr-x 1 root controlm 6471 Nov 13 2006 /opt/scripts/prod/fvaexpchbk2.ksh... (24 Replies)
Discussion started by: p_satyambabu
24 Replies

4. Programming

Doubts about timers in linux kernel

Hi , I am trying to learn timers in linux kernel. I am trying to write a program where I can configure a timer to tick in every 5 seconds and a function should thus exicute in every five seconds. I tried one program with the help of linux/timer.h headerfile but I couldnt get the... (4 Replies)
Discussion started by: iamjayanth
4 Replies

5. UNIX for Dummies Questions & Answers

Unix doubts

Hi All, 1. how and who calls .profile when you login 2. what is PPID and what means by PPID = 0 Thanks in Advance (2 Replies)
Discussion started by: ravi.sadani19
2 Replies

6. UNIX for Dummies Questions & Answers

unix doubts

Write unix command to list or view auto links (0 Replies)
Discussion started by: ashishshah.engg
0 Replies

7. Forum Support Area for Unregistered Users & Account Problems

How to post a new thread (Regarding Unix related doubts) in Unix Forums

How to post a new thread (Regarding Unix related doubts) in Unix Forums. I registered my id but I am unable to post my Questions to Forum. Thanks & Regards, indusri (1 Reply)
Discussion started by: indusri
1 Replies

8. UNIX for Dummies Questions & Answers

Unix doubts

Hello All, I am very new to UNIX. Please help me to find answers of below questions. 1.A script is saved with name ls. When we execute the script what it will execute? a) Will execute ls command b) Will execute the script c) Will execute script or command depends on the path ... (2 Replies)
Discussion started by: aswathy
2 Replies

9. Red Hat

qmail configuration in redhat linux - doubts

hi, How to Install & configure the qmail in redhat linux? and also how to get the free qmail package? I know the sendmail configuration in redhat linux. What is the features of qmail compared with sendmail? Regards, Jones (3 Replies)
Discussion started by: jones_linux
3 Replies

10. UNIX for Advanced & Expert Users

unix & C doubts

Hi, I have a few doubt here : 1) I want to run a 3 different 'C' programs in same session simulteneously (parelelly). if I make a shell, it is running one after another, I mean it shout run in 3 processors. 2) In 'C' program, how can I assing a value of the unix commant cat a.txt|wc... (1 Reply)
Discussion started by: krishna
1 Replies
Login or Register to Ask a Question