-
Notifications
You must be signed in to change notification settings - Fork 141
/
Copy pathREADME.mingw
107 lines (64 loc) · 3.16 KB
/
README.mingw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
=================================================================
libdmtx - Open Source Data Matrix Software
=================================================================
libdmtx README file (MinGW)
This README.mingw file contains information on installing and
using libdmtx using MinGW. The general README file, also found in
this directory, contains a high level summary of libdmtx and its
components.
1. Installing libdmtx on Windows using MinGW and MSYS
-----------------------------------------------------------------
libdmtx can be installed on MinGW using the instructions provided
in the general README file. However, please see below for
additional details that might benefit users on this platform.
2. Installing MinGW and MSYS
-----------------------------------------------------------------
If you haven't done so already, first install MinGW, MSYS, and
all recommended updates to your Windows system. Instructions for
doing this are provided here:
http://www.mingw.org/wiki/msys
3. Building and installing the core library
-----------------------------------------------------------------
To install libdmtx, download and unpack the libdmtx source to
your MSYS folder. If you accepted the installation defaults this
will be C:\msys\1.0.
Open the MSYS shell and run the following:
$ ./configure
$ make
$ sudo make install
Go to folder .libs:
$ cd .libs
$ ls
Now you should see following output:
libdmtx.a libdmtx.la libdmtx.lai libdmtx_la-dmtx.o
Finally run:
$ gcc -shared -o dmtx.dll libdmtx_la-dmtx.o -Wl,--out-implib,libdmtx.a
Now you should have working dmtx.dll in the folder .libs.
3.1. Building and installing the core library from different folder
-------------------------------------------------------------------
Recent MSYS2 installation uses C:\msys64 root folder, To build libdmtx:
1. install the MSYS2 packages:
$ pacman -S --needed base-devel mingw-w64-x86_64-toolchain autoconf automake make libtool
Details on how to install and setup MSYS2 environment on Windows can be found `here <https://code.visualstudio.com/docs/languages/cpp>`_
and `here <https://www.freecodecamp.org/news/how-to-install-c-and-cpp-compiler-on-windows>`_ .
2. clone git repository
3. open msys2 console and add msys' mingw64 bin folder to path environment variable
$ export PATH=$PATH:/c/msys64/mingw64/bin
4. to create configure script, run
$ ./autogen.sh
5. open the configure file and put as very first instruction the following one
LDFLAGS="-Wl,-no-undefined"
6. from within the libdmtx folder, run
$ ./configure <your building options>
$ make
Now, into .libs subfolder, you should find following files:
libdmtx.a libdmtx.la libdmtx.lai libdmtx_la-dmtx.o
Then finally run:
$ gcc -shared -o dmtx.dll libdmtx_la-dmtx.o -Wl,--out-implib,libdmtx.a
Now you should have working dmtx.dll in the folder .libs.
4. This Document
-----------------------------------------------------------------
This document is derived from the wiki page located at:
http://libdmtx.wikidot.com/libdmtx-on-windows-using-mingw
If you find an error or have additional helpful information,
please edit the wiki directly with your updates.