~ubuntu-branches/ubuntu/gutsy/blender/gutsy-security

« back to all changes in this revision

Viewing changes to extern/bFTGL/win32_vcpp/README_WIN32.txt

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2005-11-06 12:40:03 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051106124003-3pgs7tcg5rox96xg
Tags: 2.37a-1.1
* Non-maintainer upload.
* Split out parts of 01_SConstruct_debian.dpatch again: root_build_dir
  really needs to get adjusted before the clean target runs - closes: #333958,
  see #288882 for reference

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
FTGL 1.31
 
2
 
 
3
NOTES FOR COMPILING ON WINDOWS 
 
4
 
 
5
14 Feb 2002
 
6
 
 
7
Ellers, ellers@iinet.net.au
 
8
 
 
9
 
 
10
 
 
11
 
 
12
 
 
13
SUPPORTED COMPILERS
 
14
 
 
15
 
 
16
 
 
17
I have rebuilt the FTGL project files for Visual C++ (version 6). There are
 
18
 
 
19
presently no other compilers or environments supported but feel free to
 
20
 
 
21
contribute them. 
 
22
 
 
23
 
 
24
 
 
25
 
 
26
 
 
27
QUICK GUIDE: COMPILING FTGL
 
28
 
 
29
 
 
30
 
 
31
 - Start up MSVC++ with ftgl.dsw. 
 
32
 
 
33
 - Tell MSVC++ where FreeType is. You'll need to do something like this:
 
34
 
 
35
 
 
36
 
 
37
     *  select Project>Settings
 
38
 
 
39
     *  select ftgl_static (for a start)
 
40
 
 
41
     *  select "All Configurations"
 
42
 
 
43
     *  go to the tab C++ > PreProcessor
 
44
 
 
45
     *  Set additional include directories appropriately. For me it is:
 
46
 
 
47
        D:\cots\freetype-2.0.5\include
 
48
 
 
49
     *  repeat for all configurations of ftgl_dll
 
50
 
 
51
 
 
52
 
 
53
 
 
54
 
 
55
QUICK GUIDE: COMPILING/RUNNING SUPPLIED DEMO PROGRAM 
 
56
 
 
57
 
 
58
 
 
59
 - The program expects the first argument to be the name of a truetype file.
 
60
 
 
61
   I copied timesbi.ttf from the windows directory to C:\TEMP and then edit
 
62
 
 
63
   the settings of the project:
 
64
 
 
65
   
 
66
 
 
67
    * select Project>Settings
 
68
 
 
69
    * select Demo project
 
70
 
 
71
    * select panel Debug>General
 
72
 
 
73
    * set Program Arguments to be "C:\TEMP\timesbi.ttf"
 
74
 
 
75
 
 
76
 
 
77
 
 
78
 
 
79
QUICK GUIDE: COMPILING YOUR PROGRAM TO USE FTGL
 
80
 
 
81
 
 
82
 
 
83
 - Choose dynamic or static library linkage
 
84
 
 
85
     *  if you want to link to a static FTGL library ensure that 
 
86
 
 
87
        FTGL_LIBRARY_STATIC is defined in the preprocessor section
 
88
 
 
89
     
 
90
 
 
91
 
 
92
 
 
93
CONFIGURATION / CODE GENERATION / C LIBRARIES
 
94
 
 
95
 
 
96
 
 
97
FTGL can be built in various configurations (inspired by Freetype and libpng):
 
98
 
 
99
 
 
100
 
 
101
 - static library (.lib)
 
102
 
 
103
 - dynamic library (.dll)
 
104
 
 
105
 
 
106
 
 
107
MSVC++ requires selection of "code generation" option, which seems to be 
 
108
 
 
109
mostly to do with which version of the Standard C library is linked with the
 
110
 
 
111
library. 
 
112
 
 
113
 
 
114
 
 
115
The following modes are supported:
 
116
 
 
117
 
 
118
 
 
119
 - static/dynamic
 
120
 
 
121
 - single threaded (ST) or multithreaded (MT)
 
122
 
 
123
   NOTE: the multithreaded DLL (MD) mode was NOT included, as freetype itself
 
124
 
 
125
         doesn't support that mode so I figure there's no point yet.
 
126
 
 
127
 - debug/release (debug has _d suffix)
 
128
 
 
129
 
 
130
 
 
131
So the static multithreaded release library is:
 
132
 
 
133
 
 
134
 
 
135
        ftgl_static_MT.lib
 
136
 
 
137
        
 
138
 
 
139
The same library built in DEBUG mode:
 
140
 
 
141
 
 
142
 
 
143
        ftgl_static_MT_d.lib
 
144
 
 
145
 
 
146
 
 
147
If you're not sure which one is appropriate (and if you're a novice don't
 
148
 
 
149
been too put off...) start with making the decision about debug or release.
 
150
 
 
151
This should be easy because if you're building the debug version of your 
 
152
 
 
153
app its probably a good idea to link with the debug version of FTGL (but
 
154
 
 
155
not compulsory). Once thats done, you may get errors like:
 
156
 
 
157
 
 
158
 
 
159
        LIBCMTD.lib(crt0init.obj) : warning LNK4098: defaultlib "libcmt.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
 
160
 
 
161
 
 
162
 
 
163
This will happen, for example, when you link a glut app with an FTGL library
 
164
 
 
165
compiled with different codegen options than the GLUT library. 
 
166
 
 
167
 
 
168
 
 
169
MSVC++ "sort of" 
 
170
 
 
171
requires that all libs be linked with the same codegen option. GLUT is built
 
172
 
 
173
in XXX mode, so if you're linking with GLUT, you can get rid of the warning
 
174
 
 
175
by linking with the XXX version of FTGL. The various versions are particularly
 
176
 
 
177
useful if you're doing std C stuff, like printf etc. 
 
178
 
 
179
 
 
180
 
 
181
 
 
182
 
 
183
 
 
184
 
 
185
FAQ
 
186
 
 
187
 
 
188
 
 
189
Q: "But... do I HAVE to use all these DIFFERENT build modes, like multi-
 
190
 
 
191
   threaded, debug single threaded, etc?"
 
192
 
 
193
   
 
194
 
 
195
A: No. Sometimes library makers only generate one style anyway. It depends
 
196
 
 
197
   on your needs. Unless you're linking with standard C stuff (e.g. printf)
 
198
 
 
199
   then it probably won't make a great deal of difference. If you get 
 
200
 
 
201
   warnings about "default lib libcmt.lib conflicts" etc, then you can make
 
202
 
 
203
   use of the different libraries.
 
204
 
 
205
 
 
206