Instructions for 0.7.4 library
This is not confirmed, but you might try something like this:
- Create project from existing source ("DLL Project" I think)
- Exclude from project every source file except "dmtx.c"
- Add the definition "_VISUALC_" (add to existing list along with _WIN32, etc…)
- Build project
Please add your notes here if you try these steps and it fails.
(Note from schnaader) Additionally, I had to do the following steps:
- Copy libdmtx.c, libdmtx.h and libdmtx.def files from version 0.7.2 to the project's root directory
- Include those files to the project
- In Visual Studio, Properties->Linker->Input->Module Definition File, add "libdmtx.def"
Instructions for 0.7.2 library and utilities
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. 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?
4. 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.