DrawGin is a new open source project to read and write “.dwg” file formats. Current work is focused on the cross platform C++ framework to support reading drawing files in the AutoCAD R14 format, with write support to follow shortly thereafter.
There is lots of source code to view at the project page, and if you are interested in contributing to DrawGin, let me know. The code currently compiles in OS X and Linux using the Codelite IDE, and in Windows using Visual C++ 2008.
The “.dwg” format specification, versions 4.0 and 5.1, published by the Open Design Alliance are the reference documents used to write the DrawGin library.