diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/Makefile | 3 | ||||
-rw-r--r-- | examples/read_conf.c | 13 |
2 files changed, 16 insertions, 0 deletions
diff --git a/examples/Makefile b/examples/Makefile new file mode 100644 index 0000000..f49e1ae --- /dev/null +++ b/examples/Makefile @@ -0,0 +1,3 @@ +build/read_conf: read_conf.c ../release/libpom.a + @mkdir -p build + $(CC) -I.. -Wall -o $@ read_conf.c ../release/libpom.a diff --git a/examples/read_conf.c b/examples/read_conf.c new file mode 100644 index 0000000..da23534 --- /dev/null +++ b/examples/read_conf.c @@ -0,0 +1,13 @@ +#include <stdlib.h> + +#include "pom.h" + +int main(void) { + pom_error *error; + pom_conf *conf = pom_load_path("foo", &error); + if (!conf) { + pom_error_print(error); + free(error); + return EXIT_FAILURE; + } +} |