---
name: "set_config_file"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/set_config_file"
---

# set\_config\_file(3alleg)

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. If you don't call this function, Allegro will use the default  \`allegro.cfg' file, looking first in the same directory as your program and then in the directory pointed to by the ALLEGRO environment variable and the usual platform-specific paths for configuration files. For example it will look for \`/etc/allegro.cfg' under Unix.

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**(3alleg)](/set_config_data/3alleg.md), [**override\_config\_file**(3alleg)](/override_config_file/3alleg.md), [**push\_config\_state**(3alleg)](/push_config_state/3alleg.md), [**set\_uformat**(3alleg)](/set_uformat/3alleg.md), [**set\_config\_string**(3alleg)](/set_config_string/3alleg.md), [**get\_config\_string**(3alleg)](/get_config_string/3alleg.md), [**exconfig**(3alleg)](/exconfig/3alleg.md)
