LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-13-2005, 05:31 PM   #1
mlaich
LQ Newbie
 
Registered: Nov 2005
Location: Missoula, MT
Distribution: RH 9, Xandros
Posts: 26

Rep: Reputation: 15
how to place the output of compilation to some file (gcc)


Hi All,
I am working on c program, red hat 9 with gcc compiler. I want to send the compilation warnings/errors/messages to some file, but unluckily "gcc my_file.cc >> out_file" did'nt worked. Is there any bypass where I can send the output of compilation to some other file rather than on the standard output.
I have checked on gcc.gnu.org/onlinedocs/gcc-4.0.2/gcc/Overall-Options.html#Overall-Options, but could not find any.

Thanks in advance
mlaich
 
Old 12-13-2005, 05:48 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
gcc my_file.cc 2>&1 | tee out_file


Cheers,
Tink

P.S.: The extension suggests a c++ source, shouldn't
you be using g++?
 
Old 12-13-2005, 05:52 PM   #3
mlaich
LQ Newbie
 
Registered: Nov 2005
Location: Missoula, MT
Distribution: RH 9, Xandros
Posts: 26

Original Poster
Rep: Reputation: 15
thanks Tinkster,
It worked!!!
actually it is my_prog.c, i think i missed in the preview.

Thanks again..
mlaich
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Where is kernel compilation output file? Linuxrat Slackware 6 01-03-2005 10:19 AM
GCC Compilation Errors The_Dish Programming 7 10-08-2004 04:33 PM
should I use gcc-2.95.3 for kernel compilation shanenin Linux From Scratch 9 07-25-2004 10:24 PM
GCC 3.4.0 Compilation Crashes derryp Linux From Scratch 3 06-11-2004 04:22 PM
output file size Linux GNU gcc vs. DJGPP wsimmons Programming 5 01-27-2002 10:20 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration