Next: , Previous: , Up: GNU LibreDWG   [Contents][Index]


2 Usage

This chapter describes how to compile and link a program against LibreDWG. To access LibreDWG interface elements (see Types, see Functions), include its header file in the C code.

#include <dwg.h>

Optionally you can also use the

#include <dwg_api.h>

API.

Make sure you specify ‘-lredwg’ when linking, such as in this Makefile.am fragment:

AM_LDFLAGS += -lredwg

Note that the shared object library is named libredwg (with some system-specific extension, e.g., .so), so you do not want to specify -llibredwg, as that would (try to) link against liblibredwg and fail.