1. Compiling the libdmtx DLL and Import Library
The libdmtx source package provides solution and project files for Visual Studio 9.0 in the project\visualc9 directory. Use the following steps if you wish to compile only the core library:
- File > Open > File > C:\[libdmtx]\project\visualc9\libdmtx.sln
- Select/Highlight "libdmtx" in the Solution Explorer
- Build > Configuration Manager > Active solution configuration > Select "Debug" or "Release"
- Build > Build libdmtx
The Debug or Release directory in project\visualc9 will now hold the files libdmtx.dll and libdmtx.lib.
2. Compiling the libdmtx Command Line Utilities
The solution file mentioned above also includes project files for the libdmtx command line utilities, dmtxread and dmtxwrite. These programs require ImageMagick to be present on your system.
To build the utilities:
2.1. Install ImageMagick
Download and run the newest ImageMagick installer program that ends in "Q8-windows-dll.exe" from:
When the installer prompts you with options, make sure the following checkboxes are selected:
□ Update executable search path
□ Install development headers and libraries for C and C++
2.2. Compile libdmtx
Download and unpack the libdmtx source package into the directory of your choice. Next, open Visual Studio and perform the following steps:
- File > Open > File > C:\[libdmtx]\project\visualc9\libdmtx.sln
- Right-click on dmtxread in the Solution Explorer
- Properties > Configuration Properties > Linker > General > Additional Library Directories > C:\[ImageMagick?] (Update the [ImageMagick?] path to match the installation path you installed above)
- Right-click on dmtxwrite in the Solution Explorer
- Properties > Configuration Properties > Linker > General > Additional Library Directories > C:\[ImageMagick?] (update the [ImageMagick?] path to match the installation path you installed above)
- Build > Configuration Manager > Active solution configuration > Select "Debug" or "Release"
- Build > Build Solution (or press F7)
The Debug or Release directory in project\visualc9 will now hold the compiled files.
Note: If compiling libdmtx 0.7.1 (Subversion) or newer, the ImageMagick path can be updated in a single location by editing the file "magick.vsprops" using either Visual Studio options or a regular text editor.
3. Using libdmtx 0.5.0 on Windows in Delphi
Here is a small unit for Delphi to do Data Matrix creation and scanning. It comes with a pre-compiled DLL and a demo application to show some of the functionality.
[file:delphidmtx_0.5.0.zip]
4. Anything Else?
Is something missing from these instructions? If you spent hours searching for a solution that you feel should be included here then please update this page directly.
[Add your documentation here…]
Is there an "idiots guide / hello world example" to making the visual c project work with real images, i.e. generate a real windows bitmap of a 2d barcode from a text code, and the reverse?
5. This Document
Updates to this page ultimate feed into the README.visualc file that is distributed with the source package. If you are looking for information specific to an older release, please refer to this file as it exists in that package version.





