Fix Win32 Build compatibility.
[rrdtool.git] / NT-BUILD-TIPS.txt
1 Compiling RRDtool 1.1.x on Win32 (WinXP/Win2K with Visual C++):
2 ---------------------------------------------------------------
3 5/14/02 Jake Brutlag (jakeb@corp.webtv.net)
4
5 These notes share some insight I gained compiling 1.1.x with
6 MS Visual C++ 6.0 (using project files). This information may or
7 may not be accurate at the time you are reading this.
8
9 (1) freetype and rrdtool cannot use precompiled headers (which are
10 enabled by default for MSVC++ projects).  MSVC++ 6.0 does not
11 support precompiled headers if #include directives contain MACROS.
12 (2) Compile Release build with Default optimization, not the
13 Maximize Speed optimization. I encountered some strange errors
14 (related to argument processing for complex commands like graph--
15 perhaps the getopt stuff is too blame) with Maximize Speed.
16 (3) libart relies upon config.h (ostensibly generated by the
17 configure script-- but of course not on Win32 platforms). ..\..\confignt
18 (which contains a static Win32 version of config.h) should be on
19 the include path.
20 (4) Fonts are located in the %windir%\fonts, so the default font
21 is c:\winnt\fonts\cour.ttf.
22 (5) libart requires a custom build step to generate art_config.h; this
23 is done manually via the commands:
24 cl -I..\..\confignt gen_art_config.c
25 gen_art_config.exe > art_config.h
26
27 Currently, to compile rrd.lib and rrdtool.exe using
28 the MSVC++ project files, first start MSVC++ 6.0. Open the rrdtool
29 workspace (rrdtool.dsw in the src directory). The active project/
30 configuration should be rrdtool-Win32 Release. Select Rebuild All
31 from the Build menu. The static link library (rrd.lib) will
32 be generated in src\release directory and executable will be generated
33 in the src\toolrelease directory.
34
35 Compiling RRDtool on NT ... work in progress
36 ---------------------------------------------------------------
37                          by Tamas Kovacshazy (khazy@mit.bme.hu)
38
39 Persisting Problems with the current NT port:
40
41 Unfortunately, the RRD perl modules does not work with Perl
42 (ActivePerl) using the current distribution.
43
44 The RRD shared perl module can be compiled after some
45 modification...
46
47 Follow these steps:
48
49 0. Install perl if you do not have it!
50    Visit http://www.ActiveState.com/pw32/ for a complete distribution.
51
52 1. Copy ..\gd1.2\release\gd.lib  to ..\gd1.2\
53 2. Copy ..\src\release\rrd.lib to ..\src
54 3. perl Makefile.pl
55
56 In this step the system complains about something I do not
57 understand. The error message is the following:
58
59 Note (probably harmless): No library found for '-lm'
60
61 Is a library missing? But it does not stop with an error...
62
63 4. nmake test (You must have Visual C++ on the machine!)
64
65 After these steps it generates the test files (svgs and rrds),
66 and they seem to be good.
67
68 The real problem in the shared perl modul is the following:
69
70 I do not know how this installation stuff works. The problem is
71 that the installation stuff looks for the gd.lib and the
72 rrd.lib in the ..\gd1.2 and ..\src directory. The UNIX compile
73 puts the files into these directories, but the NT compile does
74 not.
75
76 It is all for today,
77
78 khazy
79
80 Tamas Kovacshazy  E-mail: khazy@mit.bme.hu  
81 WWW: http://www.mit.bme.hu/~khazy
82 Technical University of Budapest 
83 Department of Measurement and Information Systems