Read Me
LibDWG is a free C library to read DWG files. It is licensed under the terms
of the GNU General Public License version 3 (or at your option any later version).
DWG is a file format created in the 70's for the emerging CAD applications.
Currently it is the native file format of AutoCAD, a proprietary CAD program
developed by AutoDesk.
LibDWG is a re-fork from LibreDWG due to its freezing state. Original LibDWG
paused since June 2009, it was written using Esperanto, but from September
2003 its development got in the run again, in English. At this moment the
decoder is not extensively tested. It reaches 97% read support in the data
structures parser and still needs a test suite. An utility application is
available, it is a dumping program: dwg-dump.
Please subscribe the package list for sharing ideas:
https://lists.sourceforge.net/lists/listinfo/libdwg-talk
If you are looking for general information about the project, check the website:
http://libdwg.sf.net/
or LibreDWG website:
http://www.gnu.org/software/libredwg
== Building and installing the library ==
See INSTALL for generic instructions. Basically, you do:
$ ./configure [options]
$ make
$ make check # optional but strongly encouraged
$ make install
This builds and installs various files in the "installation dirs":
$libdir ($exec_prefix/lib) -- library files (libdwg.*)
$includedir ($prefix/include) -- dwg.h
Use "./configure --help" to see a full list of options you can use to
customize the installation dirs. Other options recognized by configure are:
--disable-trace
Disable runtime tracing (default: enabled). When enabled, the environment
variable LIBDWG_TRACE is consulted on the first decode attempt.
Its value is an integer: 0 (no output) through 9 (full verbosity).
== Example usage of the library ==
The check directory contains an application code that links with libdwg:
* load_free.c -- This is a skeleton code. Look there if you want to have a
quickly glance on how to use the library.
The programs directory contains utilities that uses libdwg:
* dwg-dxf.c -- Opens a DWG file and converts it to a DXF one. It may be used as
an example of how to use the library. Generates R2000 files.
* dwg-dump.c -- Opens a DWG file and outputs a text dump of its data. It is not
useful as API usage example, it relies on some of libdwg's src files.
* dwg-preview.c -- Extracts the bmp thumbnail of a dwg file when it is
available. It does not give a normal bitmap file, just some kind of raw data
not known yet.
/*****************************************************************************/
/* LibDWG - free implementation of the DWG file format */
/* */
/* Copyright (C) 2009, 2010, 2013 Free Software Foundation, Inc. */
/* */
/* This library is free software, licensed under the terms of the GNU */
/* General Public License as published by the Free Software Foundation, */
/* either version 3 of the License, or (at your option) any later version. */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/*****************************************************************************/