File: INSTALL

package info (click to toggle)
fox 1.0.52-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 10,788 kB
  • ctags: 13,384
  • sloc: cpp: 96,482; sh: 8,338; ansic: 1,935; makefile: 1,010; perl: 32
file content (426 lines) | stat: -rw-r--r-- 14,400 bytes parent folder | download
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
                              The FOX GUI Library Installation
                              ================================



Systems Which are Supported or Known to work:
=============================================

  o LINUX
  o Windows 2000, Windows NT 4, Windows 9x, (VC++, Cygwin1.1 or MinGW,
    Borland C++)
  o Digital Unix/COMPAQ Tru64  OSF1 3.2, 4.0x
  o SGI IRIX 5.3, 6.1, 6.2, 6.4, 6.5 (MIPS Pro C++)
  o SUN Solaris, SunOS (gcc, SUN WorkShop Compiler)
  o HP-UX 9.x, 10.x and 11.00
  o AIX 4.2, 4.3
  o FreeBSD
  o Sequent DYNIX/ptx 4.4.7
  o IBM VisualAge C++ 3.5 (Windows)



For most UNIX systems.
======================

For most unix systems which have OpenGL installed, you can type:


  ./configure


You can disable OpenGL support with --with-opengl=no.  You can also force MESA
if your system has both; this is useful if e.g. OpenGL is broken.  To force
MESA, use --with-opengl=mesa.

After configure runs its course, simply type ``make'' to build the library,
and ``make install'' to install it.

FOX should compile on most unix platforms; we have tested the following:
SGI, IBM, HP, SUN, DEC, LINUX, all with gcc; however, FOX uses a fairly
conservative subset of C++, and should be no problem to port to other, more
primitive, C++ compilers.

On some machines, the X11 header files are still K&R C, instead of ANSI-C.
You might try define add "-fpermissive" to the CXXFLAGS environment variable
prior to running configure (this is the flag for GCC; other compilers may
have similar option for old K&R C).

When programming against FOX, you should only have to include "fx.h", and
for 3D programs, "fx3d.h".  To use keyboard symbols, include "fxkeys.h" also.
Specifically, to remain portable application programs should NOT include any X
window header files.

You may of course need other system headers ("stdio.h", "gl.h", etc).



Building Shared or Non-Shared Libraries.
========================================

You can build FOX either as shared library, static library, or both.  The
default is both.  To build static library only [this may be necessary on
certain systems where shared library support is lacking]:


  ./configure --disable-shared


to build shared library only:


  ./configure  --disable-static



Building for Debug or Release.
==============================

FOX can be built with three levels of debugging.  Full debug executables are
build by configuring with:


  ./configure --enable-debug


Building for debug will add debug symbols as needed by your debugger.  It also
includes assert and tracing into the library.  This setting is recommended if
you need to debug the FOX library itself.


Normal builds [w/o any special arguments to configure] will include assert and
trace statements into the library, but no debug symbols.  This mode compiles
the fastest and allows for tracing of the FOX library.  This mode is the
recommended way to develop FOX applications, as it allows for resource tracing
and internal consistency checks.


To build for release, use:


  ./configure --enable-release


Release builds strip all debug information, asserts, and tracing, and generates
optimized code.  The resulting library is the smallest/fastest, and this is the
recommended setting for production code.



For LINUX systems.
==================

You will need to install the Mesa graphics library.  FOX is being developed
on Mandrake 8.1 and Mesa 3.x.  It is known to work with older versions of RedHat
or Mesa.  I recommend Mesa 2.6 or above.

With regard to 3D, FOX may be build three ways:


No 3D support whatsoever:

  ./configure --with-opengl=no


Linking against Mesa:

  ./configure --with-opengl=mesa


Linking against Native OpenGL:

  ./configure --with-opengl=opengl


Under normal circumstances, configuration will find OpenGL if it is available
on the machine, and will build the libraries to use it; on Linux, however,
Mesa is detected, but the libraries are called libGL, and not libMesaGL.



On SGI IRIX 6.x
===============


On SGI Systems where MIPS Pro C++ compiler is used instead of GCC, you will
need to set the environment variable CXX to:


  CC -n32


and then run:

  ./configure --with-opengl=opengl --x-libraries=/usr/lib32


or, you can also build FOX for the 64 bit model, and set CXX to:


  CC -64


and run configure with:

  ./configure --with-opengl=opengl --x-libraries=/usr/lib64


The first argument is only needed if you also have MESA on your system.
FOX searches for the png library [for Portable Network Graphics, the successor
of GIF],  but the library it finds, even though it has the same name, is not
the right one.  You will need to disable this feature, or download the PNG
library from http://www.graphicswiz.com/png/ and compile it, and pass the
appropriate flags for your compiler to find the new version.
If compiling without PNG, pass the flag:  --disable-png; likewise, you
can disable JPEG with the flag: --disable-jpeg.

Using gcc 2.95.2 on IRIX 6.x (Thanks to Theo Venker)
====================================================

You won`t believe the solution: rename FXApp.cpp to FXApp.C and everything
is fine. The manual page of g++ says that it accepts C++ suffixes .C, .cc,
.cxx, .cpp, and .c++, and it does, but for .cpp and .c++ it compiles with
-D__LANGUAGE_C -D_LANGUAGE_C -DLANGUAGE_C whereas the others suffixes
use -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS. This is clearly a
bug in g++. I decided to wait for the next g++ release, so I didn`t
report this to the g++ maintainers. May be you will.

The work-arround is:

  export CC="g++ -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS"

and then run configure.




On Alpha Processor based Workstations (COMPAQ/DEC OSF1)
=======================================================


If you use DEC's "cxx" instead of GNU gcc, you will need to make sure the
you add the flag option -D_XOPEN_SOURCE_EXTENDED to the compiler; this
will allow usage of a wider set of POSIX functions; GCC seems to have
this flag on by default, but the standard C++ compiler on OSF1 does not;
thanks to thomas.goessler@avl.com for pointing this out.

When compiling with gcc on Digital Unix, you may want to enable gradual
underflow support for IEEE754 conformant floating point operations:


    export CXX="gcc -mieee"
    ./configure ....


If this flag is NOT set, floating point operations which yield underflows
will cause a floating point exception (SIGFPE).

Many perfectly correct programs may generate underflows when working
with small numbers (~1e-38 single precision, ~1e-308 double precision);
working with these numbers may involve so-called denormalized floating
point numbers, i.e. numbers where the mantissa can no longer be shifted
to be within [0.5,1.0> range due to the exponent becoming 0.

The ALPHA CPU does not include hardware do manipulate these numbers and
will generate a trap when trying to manipulate these numbers; passing
the "-mieee" flag will incorporate a software handler to ensure IEEE754
conformant floating arithmetic.




Compiling FOX with the SUN WorkShop Compiler
============================================

To use the SUN compilers, simply configure FOX as follows:

  > cd fox
  > env CC=cc CXX=CC LD=CC ./configure


Explanation:

The SUN compilers require 'CC' to be used instead of 'ld' for creating the
shared object library. This is to ensure that template instances will be
included in the library. To build a static library 'CC -xar' should be
used instead of 'ar' but there is no simple way to do this, due to
limitations in 'libtool'.

To get around this problem, the configure script invokes 'CC' with the
argument '-instances=global', thus including template instances in the
object file instead of using a template repository. This works fine and
'ar' can be used to build a static object library.

Daniel Gehriger <gehriger@epfl.ch>



Compiling FOX using the HP/UX C++ Compiler
==========================================

You may want to use GNU make instead of HP's make (/usr/bin/make). The default
version of make doesn't seem to process the dependencies for PathFinder
correctly and thus doesn't generate the reswrapped icon header files. Since
PathFinder is built after the library and all the test programs, this isn't
a huge problem -- it just means that the build will stop at that point with
an error message.

Configure the build by typing:

    env CC="cc +DA2.0W" CXX="aCC +DA2.0W +W740,749,863" ./configure

The "+DA2.0W" flag tells it to compile as 64 bit. The "+W740,749,863" option
suppresses a few warning messages that we believe are safe to ignore ;)


Windows 95/98/NT Builds
=======================

We currently build FOX on a regular basis using Microsoft Visual C++ 6.0.
There is also support for Mingw32, the latest net release of Cygwin (v1.1)
and Borland C++. We have heard of mixed success with building under Symantec's
C++ 7.5 compiler.

A few things to keep in mind:

 1. If you want to include OpenGL support be sure to define the HAVE_OPENGL
    symbol on the compiler's command line, and to link your executables to
    the opengl32.lib and glu32.lib libraries.

 2. The native Windows version of FOX relies on an undocumented API called
    _TrackMouseEvent() which is found in comctl32.dll. You should be sure
    to link your FOX applications with the comctl32.lib import library.
    Note that for this function is only available for comctl32.dll
    versions 4.70 or later; the latest version of this DLL can be downloaded
    from Microsoft's web site:

	http://www.microsoft.com/msdownload/ieplatform/ie/comctrlx86.asp

    If you are running Windows 98, Windows NT 4.0 SP3, or have installed
    Internet Explorer 4.0 or later, you *probably* already have the latest
    version of this DLL already.

 3. The FOX registry mechanism uses the regular Windows registry under the
    hood; those functions are found in advapi32.lib which is not always a
    standard library. If you get some unresolved symbols at link time (esp.
    with names beginning with "Reg") try adding advapi32.lib to the list
    of libraries.


Building with Microsoft Visual C++
==================================

We now have a project workspace and project files set up for Win32 builds
under Visual C++ 6.0. To use these, perform the following steps:

  1. Download the latest fox.tar.gz from the web site;

  2. Unzip & untar in your favorite place;

  3. Start Visual C++ and open the fox/windows/vcpp/win32.dsw workspace;

  4. Choose a project and build it. The project corresponding to the library
     itself is named "fox", and all of the other projects list it as a
     dependency. So if you choose, say, "glviewer" to build, it should first
     build the library and then build the glviewer test program.


Building with Borland C++ Compilers
===================================

The Borland makefiles are now tested semi-regularly against the free
command-line compiler tools (compiler version 5.5) distributed by
Borland/Inprise. We believe that they should also be usable for any recent
Borland C++ compilers (e.g. Borland C++ Builder 3 or later).

To build the FOX library, utility programs and example programs, change to the
fox-0.99.xxx\windows\borland subdirectory and type "make". It should compile
without a hitch, with the possible exception of building the OpenGL test
programs in the "tests" subdirectory:

 + If you're using the free command-line compiler tools, you want to be sure
   that the %BCCDIR%\Lib\PSDK directory appears in the linker configuration
   file (%BCCDIR%\Bin\ilink32.cfg). If it isn't there, the linker won't know
   where to find the opengl32.lib and glu32.lib import libraries.

 + If you're using an older Borland compiler, you similarly want to be sure
   to have the updated OpenGL SDK for Win32 (including the OpenGL 1.2 header
   files and import libraries).

If for some reason you don't have the correct header files and import libraries
for OpenGL, and if OpenGL support isn't important for your project anyways,
just modify the "Makefile.bc" in the fox-0.99.xxx\tests subdirectory so that
it doesn't try to build the "glviewer.exe" or "gltest.exe" examples.


Building FOX as a DLL
=====================

The FOX library can also be built as a DLL for Windows; this is done by
selecting the "foxdll" project and building it. Building this project
causes the import libraries and DLLs to be placed in fox/lib.
The filenames are foxdll.lib and foxdll.dll for the Release build, or
foxdlld.lib and foxdlld.dll for the Debug build.

To compile your own FOX applications so that they use the FOX DLL instead of
the static FOX library, be sure to define the FOXDLL symbol in your compiler
flags. Also note that the DLL must be in your search path for the program to
run!


Building FOX using MinGW
==========================

Please see the standard FOX documentation file, "Developing Win32 GUI
Applications Using FOX", available in this distribution as the file
"doc/win32.html".


Building FOX using Cygwin 1.1
=============================

FOX can also be built against the latest net release of Cygwin, available
for download from here:

	http://sourceware.cygnus.com/cygwin/mirrors

It absolutely will not compile with previous releases of Cygwin (i.e.
Cygwin B20.1 or earlier), at least not without a lot of headaches. The
win32api header files distributed with earlier versions of Cygwin were not
up-to-date enough for FOX.

It should compile out-of-the-box by typing:

	./configure --disable-shared
	make



Image Formats in File Browser
=============================

By default, only GIF, BMP, and XPM icons are supported in the File and Directory
Browsers.  This can be easily amended by the new compiler flag:


    -DALL_IMAGE_FORMATS=1


This will enable all available image formats.  This will necessitate every FOX
application to link to the image libraries!!

Another flag is the default icon search path, i.e. where the file browser will
normally look to find and load icons bound to file extensions.
The path below will cause the system to look in three different directories:


    -DDEFAULICONPATH="~/.foxicons:/usr/local/share/icons:/usr/share/icons"


This would be a common setting for LINUX.  Note that this is only the default;
the actual search path can by set at any time by means of the FOX registry setting:


    [SETTINGS]
    iconpath="/home/extraicondir:/usr/share/icons"