2 |
7u83 |
1 |
TenDRA Frequently Asked Questions
|
|
|
2 |
---------------------------------
|
|
|
3 |
|
|
|
4 |
I am preparing this list of frequently asked questions from the questions
|
|
|
5 |
people actually ask me, so it is far from complete.
|
|
|
6 |
|
|
|
7 |
1. QUESTION: I try to compile the following simple C++ program:
|
|
|
8 |
|
|
|
9 |
#include <iostream.h>
|
|
|
10 |
|
|
|
11 |
int main ()
|
|
|
12 |
{
|
|
|
13 |
cout << "hello world\n" ;
|
|
|
14 |
return 0 ;
|
|
|
15 |
}
|
|
|
16 |
|
|
|
17 |
and the compiler is giving me errors.
|
|
|
18 |
|
|
|
19 |
ANSWER: This release only contains the bare minimum language
|
|
|
20 |
support library, not the fully standard C++ library. See the
|
|
|
21 |
C++ producer documentation for more details.
|
|
|
22 |
|
|
|
23 |
2. QUESTION: I try to build the release, but I am having problems
|
|
|
24 |
in the API library building phase.
|
|
|
25 |
|
|
|
26 |
ANSWER: Unfortunately this area is _very_ operating system
|
|
|
27 |
dependent. I've set it up so that it works for the operating
|
|
|
28 |
systems listed under supported platforms, but this is not a
|
|
|
29 |
cast iron guarantee that it will work for other versions of the
|
|
|
30 |
same operating system.
|
|
|
31 |
|
|
|
32 |
Some understanding of how the system works is useful in trying
|
|
|
33 |
to work round problems. The start-up files describing the
|
|
|
34 |
macros needed to nagivate the system headers for a particular
|
|
|
35 |
API are found in:
|
|
|
36 |
|
|
|
37 |
src/lib/machines/<os>/<cpu>/startup/<api>.h
|
|
|
38 |
|
|
|
39 |
where <os> is the operating system name, <cpu> is the CPU type,
|
|
|
40 |
and <api> is the API name. A set of replacement system headers,
|
|
|
41 |
which are checked before the real system headers, are found in:
|
|
|
42 |
|
|
|
43 |
src/lib/machines/<os>/<cpu>/include
|
|
|
44 |
|
|
|
45 |
These are also used with the -Ysystem option to tcc, modifications
|
|
|
46 |
which are specific to library building, should be enclosed in:
|
|
|
47 |
|
|
|
48 |
#ifdef __BUILDING_LIBS
|
|
|
49 |
.....
|
|
|
50 |
#endif
|
|
|
51 |
|
|
|
52 |
Good places to look for inspiration on how to customise these
|
|
|
53 |
files for your particular system include looking to see how
|
|
|
54 |
I've done things in similar circumstances. Often a problem
|
|
|
55 |
crops up on more than one machine; I may have a workround which
|
|
|
56 |
works on another platform which you can steal.
|
|
|
57 |
|
|
|
58 |
If you don't intend to re-distribute the TenDRA source code
|
|
|
59 |
you also have an option which, for copyright reasons, is not
|
|
|
60 |
available to us. You can copy the system header into the include
|
|
|
61 |
directory above and make minor corrections directly.
|
|
|
62 |
|
|
|
63 |
If all else fails you can tell the library building to ignore
|
|
|
64 |
the header. Find the source file which is failing to compile.
|
|
|
65 |
This should contain lines like:
|
|
|
66 |
|
|
|
67 |
#define __BUILDING_TDF_<API>_<HEADER>
|
|
|
68 |
#ifndef __WRONG_<API>
|
|
|
69 |
#ifndef __WRONG_<API>_<HEADER>
|
|
|
70 |
....
|
|
|
71 |
#endif /* __WRONG_<API> */
|
|
|
72 |
#endif /* __WRONG_<API>_<HEADER> */
|
|
|
73 |
|
|
|
74 |
If you insert the line:
|
|
|
75 |
|
|
|
76 |
#define __WRONG_<API>_<HEADER>
|
|
|
77 |
|
|
|
78 |
in the corresponding API start-up file:
|
|
|
79 |
|
|
|
80 |
src/lib/machines/<os>/<cpu>/startup/<api>.h
|
|
|
81 |
|
|
|
82 |
then the library builder will ignore this header. You will get
|
|
|
83 |
a compile-time error ("token not defined") if you subsequently
|
|
|
84 |
try to use one of the features from this header.
|