---
name: "xo_error"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/xo_error"
---

# xo\_error(3)

generate simple error messages in multiple output styles

## NAME

**xo\_error** – generate simple error messages in multiple output styles

## LIBRARY

library “libxo”

## SYNOPSIS

**#include \<libxo/xo.h\>**

*void*\

**xo\_error**(*const char \*fmt*, *...*);

## DESCRIPTION

Use the **xo\_error**() function to generate error messages to standard error. The  *fmt* argument is a string containing printf-style formatting instructions that describe the remaining arguments.

When converting an application to **libxo**, one can replace *fprintf(stderr,...)* calls with **xo\_error**() calls.

## SEE ALSO

[printf(3)](/printf/3.md), [xo\_emit(3)](/xo_emit/3.md), [libxo(3)](/libxo/3.md)

## HISTORY

The **libxo** library first appeared in FreeBSD 11.0.

## AUTHORS

**libxo** was written by Phil Shafer ⟨*phil@freebsd.org*⟩.
