---
name: "set_config_file"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/set_config_file/3alleg4"
---

# set\_config\_file(3alleg4)

Sets the configuration file. Allegro game programming library.

## NAME

set\_config\_file - Sets the configuration file. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**void set\_config\_file(const char \*filename);**

## DESCRIPTION

Sets the configuration file to be used by all subsequent config functions. (Allegro will not search for this file in other locations as it does with allegro.cfg at the time of initialization.)

All pointers returned by previous calls to get\_config\_string() and other related functions are invalidated when you call this function! You can call this function before install\_allegro() to change the configuration file, but after set\_uformat() if you want to use a text  encoding format other than the default.

## SEE ALSO

**set\_config\_data**(3alleg4), **override\_config\_file**(3alleg4), **push\_config\_state**(3alleg4), **set\_uformat**(3alleg4), **set\_config\_string**(3alleg4), **get\_config\_string**(3alleg4), **exconfig**(3alleg4)
