Debian Codegraph @

README.Windows

raw
1 Compiling the library in Windows
2 ================================
3
4 DISCLAIMER: these notes are not very reliable, as they're
5 based on some very simple tests, without much knowledge of
6 the Windows operating system.
7
8 1) Using MinGW/MSYS
9
10 Everything goes as in standard *nix systems (you should
11 probably change the default installation location with the
12 --prefix option in `configure').
13 With the default options, the `configure' sctipt produces a
14 DLL. If you want to build a static library, you should pass the
15 options --disable-shared and --disable-declspec to
16 `configure', and make sure you define the preprocessor
17 LQR_DISABLE_DECLSPEC whenever you want to compile/link
18 against the static library.
19
20 2) Using MS Visual C++
21
22 The library compiles with `Microsoft Visual C++ 2008 Express
23 edition' and `Microsoft Visual C++ 2010 Express Edition'.
24 Follow these steps:
25
26 a) Create a new project (suggested name: `liblqr-1-0')
27
28 *) In the 2008 edition, create an empty DLL project with
29 the default setup (choose Console Application then
30 Advanced Settings -> DLL + Empty Project). The
31 suggested name is liblr-1-0
32
33 *) In the 2010 edition, choose Empty project
34
35 b) Copy the `lqr' directory in the project directory you
36 have created
37
38 c) Add all the source files within the `lqr' directory to
39 the project (right-click -> Add -> Existing item...)
40
41 d) Go to Project -> Properties in the menu. This opens a
42 dialog. At the top, set "Configuration:" to "All
43 Configurations". Then, go to "Configuration Properties"
44 and set the options as follows:
45
46 *) [2010 edition only] General -> Configuration Type:
47 Dynamic Library
48
49 *) C/C++ -> General -> Additional Include Directories:
50 add the directory `lqr' and its parent, and also the
51 directory where all the necessary glib-2.0 headers are
52 found (usually, there are 2 of those, one ends with
53 `include\glib-2.0', another with
54 `lib\glib-2.0\include')
55
56 *) C/C++ -> Preprocessor -> Preprocessor Definitions: add
57 LQR_EXPORTS to the list
58
59 *) C/C++ -> Advanced -> Compile As: Compile as C Code (it
60 also works otherwise, but this option seems to make
61 sense given that the library is ANSI C)
62
63 *) Linker -> General -> Version: set version number
64
65 *) Linker -> General -> Additional Library Directories:
66 add the directory where glib-2.0.lib is found
67
68 *) Linker -> Input -> Additional Dependencies: add
69 glib-2.0.lib
70
71 When you build the project, it should produce the library
72 liblqr-1-0.lib and liblqr-1-0.dll files (assuming your
73 project is called `liblqr-1-0').