How do I capture all of my compiler's output to a file?

前端 未结 10 2508
無奈伤痛
無奈伤痛 2020-12-23 09:16

I\'m building an opensource project from source (CPP) in Linux. This is the order:

$CFLAGS=\"-g Wall\" CXXFLAGS=\"-g Wall\" ../trunk/configure --prefix=/some         


        
10条回答
  •  忘掉有多难
    2020-12-23 09:27

    The compiler warnings happen on stderr, not stdout, which is why you don't see them when you just redirect make somewhere else. Instead, try this if you're using Bash:

    $ make &> results.txt
    

    The & means "redirect stdout and stderr to this location". Other shells often have similar constructs.

提交回复
热议问题