Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8412515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:41:19+00:00 2026-06-10T00:41:19+00:00

I am writing a web server, mainly for practice, and decided to get to

  • 0

I am writing a web server, mainly for practice, and decided to get to learn about make and makefiles. My aim is to automate builds to my vps, using Clang/LLVM to build the software, and save the diagnostics to a text file, for a script to submit to my email address. What I can not seem to achieve is to save the diagnostics to my file.

While my Clang builds successfuly, and generates the diagnostics, and my makefile seems to work, I have failed to redirect the diagnostics, both from inside the makefile, and the command line.

My makefile (working correctly, but slightly modified to accomodate the need to save results):

# Makefile to build Ironman HTTP Server
# We will use the clang frontend from the llvm compiler infrastructure
# for building

# --- targets
Ironman : 
        clang -o Ironman src/Ironman.c > report

# --- remove binary and executable files
clean:
        rm -f Ironman
        rm -f report

I suspect that ( I may be terribly wrong here) this happens because clang doesn’t really return the diagnostics, it just prints them. I do not know if this is the case, and the Clang user guide doesn’t suggest anything like that.

[EDIT]: I played with Clang a bit and saw that on a successful compilation it returns 0. The method that I tested it with is:

$ clang <source_file.c>
$ echo $?
0

This suggests that my theory may be correct, which complicates things :-\

Could somebody point me in the right direction?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T00:41:21+00:00Added an answer on June 10, 2026 at 12:41 am

    Clang, like any other program, outputs diagnostics to stderr. You can redirect stderr to stdout like so:

    Ironman : 
        clang -o Ironman src/Ironman.c > report 2>&1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm in the process of writing some web server controls to make working with
So, lets say I'm writing a web server and I want to support very
I'm writing a tornado web server and I'm trying to keep it from blocking
I'm writing a custom web server. When I enter the URL of my server
I'm writing a small web server for testing purposes using python, BasicHTTPServer and SimpleHTTPServer.
I am writing a program which needs to access data in a web server.
Background I'm writing an web application so I can control an Ubuntu Server from
I am writing a simple web server in java as an exercise. When I
I'm writing a set of C# composite web server controls for displaying dialog boxes.
I've almost finished writing a HTTP/1.0 compliant web server under Java (no commercial usage

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.