• Advertisement
Sign in to follow this  

Not shure if this is the place to ask.

This topic is 4797 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I wana mess around with a mud code base and im trying to use cygwin to compile. But I get a bunch of warrnings and a couple errors. Does anyone know if there is a way to put the output in a text file or something simmilar so I can study it better so I might be able to fix the problems?

Share this post


Link to post
Share on other sites
Advertisement
this might belong more in the "Everything UNIX" forum, but this one is ok. To output to a file called 'output.txt', add a >output.txt after the command

Share this post


Link to post
Share on other sites
Well, in Windows/DOS you can send output from a command to a file using the ">" symbol - for example,

dir *.exe > apps.txt

Would create a file "apps.txt" that listed all your exe files. Same for any program.

Share this post


Link to post
Share on other sites
Well the > sorta works. But for some reason it doesn't output the warrnings and errors. The things im really looking for. ><

Share this post


Link to post
Share on other sites
gcc outputs warnings and errors to stderr. In order to pipe stderr to a file under bash (the default cygwin shell) you can use gcc (blah blah blah) >& errors.txt

Share this post


Link to post
Share on other sites
Meh? If they are printed to the console, they should end up in the text file.
Multiple executeables are run in the compilation process (compilers and linkers) - maybe you put the > output.txt on the wrong program, and the program that does all the warnings and errors stuff hasn't got that extra bit on the command line?

Share this post


Link to post
Share on other sites
Your probibly right benryves. Ive been using the make file. Which calls gcc a bunch of times. Gehh I figure it out later when I have had some sleep.

Share this post


Link to post
Share on other sites
the > will send stdout to the text file. if you want to send stderr, then you need to do

gcc ... 2> err.txt

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement