Find the answer to your Linux question:
Results 1 to 5 of 5
Hi all How do I redirect the compiler warning and errors to file from a makefile ? thanks Tom...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2007
    Posts
    4

    gcc output to file in makefile


    Hi all
    How do I redirect the compiler warning and errors to file
    from a makefile ?

    thanks
    Tom

  2. #2
    Linux Enthusiast
    Join Date
    Aug 2006
    Posts
    631
    To redirect the errors to a file:

    Code:
    command 2>> logfile
    Regards

  3. #3
    Just Joined!
    Join Date
    May 2005
    Posts
    21
    Quote Originally Posted by tomerg
    Hi all
    How do I redirect the compiler warning and errors to file
    from a makefile ?

    thanks
    Tom
    Code:
    make &> outputfile
    this will put all prints like error and warning in outputfile.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Apr 2007
    Posts
    4
    Hi

    1. the ">>" way doesnt send the warnings to the file only the make
    commands
    2. the "&>" method gives me an error "invalid null command"

    thanks

  6. #5
    Just Joined!
    Join Date
    Apr 2007
    Posts
    4
    it works using bash script
    thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •