Compile and dump errors to a text file


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Compile and dump errors to a text file
# 1  
Old 10-22-2006
Data Compile and dump errors to a text file

Hi there,

I want to compile a program and dump errors to a text file. How could I do so..?

Thanks for reading and thanks in advance!!!
# 2  
Old 10-22-2006
Code:
$ make > error.log 2>&1

Carl
# 3  
Old 10-22-2006
Thanks a lot Carl!!
# 4  
Old 10-23-2006
BOFH,
if he just wants to compile the errors, wont 'filename 2> errorlog' work? why do we need to use make command? plz explain

Last edited by napolayan; 10-23-2006 at 03:03 AM..
# 5  
Old 10-23-2006
Many thanks napolayan!!
# 6  
Old 10-23-2006
Quote:
Originally Posted by starstarting
Many thanks napolayan!!
oops! i edited my reply... so plz reply to this
# 7  
Old 10-23-2006
Quote:
Originally Posted by napolayan
BOFH,
if he just wants to compile the errors, wont 'filename 2> errorlog' work? why do we need to use make command? plz explain
As a programmer, I use makefiles to manage all my programs. Since he didn't specify, I used "make" in my example.

As to output, since we don't know for sure what program he's using and which error output he wants to see, redirecting all output to the error file could be productive (warnings are errors after all Smilie ). But for any output that's going to just STDERR then yea, your line would work.

Carl
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

CPU Usage statistics Dump in a text file over a period of time

I am facing issue related to performance of one customized application running on RHEL 5.9. The application stalls for some unknown reason that I need to track. For that I require some tool or shell scripts that can monitor the CPU usage statistics (what we get in TOP or in more detail by other... (6 Replies)
Discussion started by: Anjan Ganguly
6 Replies

2. Shell Programming and Scripting

Connection to Oracle data and dump text file

Hi for all! I need for my job one shell script very concrete about connection to oracle databases and writing to text file. Well I tell you: 1.- I must read a file as parameter from linux interface: > example.sh fileToRead 2.-I must read line to line in "fileToRead" and take a... (9 Replies)
Discussion started by: wien996
9 Replies

3. Programming

compile errors with gcc4.1.2 in rhel5.5

Hi All, My test code ldap_test.c can be compiled successfully with gcc2.95.2. But not gcc 4.1.2 in redhat5.5. The command I used and the output are: #gcc -fPIC -shared -o lib_ldap_rhel.so ldap_test.c /usr/include/ldap.h:179: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âtypedefâ... (2 Replies)
Discussion started by: rluo
2 Replies

4. UNIX for Dummies Questions & Answers

Compiling gcc to compile make to compile yaboot

I have just installed OpenBSD on a 333MHz PPC iMac G3. It has a 6GB HDD that has been partitioned as 1GB MacOS 8.5.1, 3GB MacOS X 10.3.9, 2GB OpenBSD 4.8. I now need to install a bootloader so that my computer can recognize the OpenBSD partition at startup. I have been trying to install... (0 Replies)
Discussion started by: t04st3r
0 Replies

5. Solaris

Compile errors on Solaris 10 (missing libwrap)

I'm trying to compile tacacs+-F4.0.4.18 on Solaris 10 (sparc based server). It fails during the "./configure" phase with the following error: checking whether to use libwrap... yes configure: error: Could not find libwrap. You must first install tcp_wrappers. I do a have tcpwrappers... (4 Replies)
Discussion started by: pingmeback
4 Replies

6. Solaris

Errors trying to compile PHP for use with MySQL on Solaris 10

have installed and am using the GNU based tools from the Sunfreeware site to compile PHP. I already have Apache, MySQL, and Oracle compiled and working properly. Below is my configure string for my PHP build: ./configure --prefix=/usr/local/php5 \... (2 Replies)
Discussion started by: sunsysadm2003
2 Replies

7. Programming

Not able to compile Pro*c file due - give errors and points to /usr/include/.. file

I am trying to compile the pro*C file but gives errors. It says it encountered "std" while it was expecting ; , = ( $ $ORACLE_HOME/bin/proc tradewind/dataaccess/Blob.pcc Pro*C/C++: Release 10.2.0.3.0 - Production on Fri May 9 11:10:54 2008 Copyright (c) 1982, 2005, Oracle. All rights... (0 Replies)
Discussion started by: shafi2all
0 Replies

8. AIX

Compile errors because of the ras.h file

I recently compile some code in 32 bit mode on a AIX 5.3 server that has its kernal set to 64 bit mode. The compile was successful and the code works great. That being the case I use the model of the successful makefile on some other code but ended up getting errors that looked like this...... ... (2 Replies)
Discussion started by: morrisey
2 Replies

9. Programming

compile xev on HPUX 10.20 - errors

Hello, i compiled the program xev under HPUX 10.20 and there are a lot of errors like this. Can anybody help me to fix this errors? make xev cc -O xev.c -o xev /usr/ccs/bin/ld: Unsatisfied symbols: XFree (code) XKeysymToString (code) XSelectInput (code) XOpenDisplay... (1 Reply)
Discussion started by: lan
1 Replies

10. UNIX for Dummies Questions & Answers

help, what is the difference between core dump and panic dump?

help, what is the difference between core dump and panic dump? (1 Reply)
Discussion started by: aileen
1 Replies
Login or Register to Ask a Question