12 #ifndef VRPN_IGNORE_NO_CPLUSPLUS 13 #error Need to compile with a C++ compiler, not a C compiler. The problem is that in Windows, filenames are case-insensitive. So the compiler cannot tell mumble.c from mumble.C. Visual Studio decided to make .cpp (which used to mean run the C preprocessor) mean C++ and both .c and .C mean C. The other problem is that when you insert a new file into a project, it FOR THAT FILE makes an override. The project settings say C++ but if you right-click on the file itself it has an override to compile with C. This needs to be changed for both the .C file and the .h file. 34 typedef char vrpn_int8;
35 typedef unsigned char vrpn_uint8;
36 typedef short vrpn_int16;
37 typedef unsigned short vrpn_uint16;
38 typedef int vrpn_int32;
39 typedef unsigned int vrpn_uint32;
40 typedef float vrpn_float32;
41 typedef double vrpn_float64;
45 #define VRPN_ARCH hpux 46 typedef char vrpn_int8;
47 typedef unsigned char vrpn_uint8;
48 typedef short vrpn_int16;
49 typedef unsigned short vrpn_uint16;
50 typedef int vrpn_int32;
51 typedef unsigned int vrpn_uint32;
52 typedef float vrpn_float32;
53 typedef double vrpn_float64;
59 #define VRPN_ARCH __hpux 60 typedef char vrpn_int8;
61 typedef unsigned char vrpn_uint8;
62 typedef short vrpn_int16;
63 typedef unsigned short vrpn_uint16;
64 typedef int vrpn_int32;
65 typedef unsigned int vrpn_uint32;
66 typedef float vrpn_float32;
67 typedef double vrpn_float64;
71 #define VRPN_ARCH sparc 72 typedef char vrpn_int8;
73 typedef unsigned char vrpn_uint8;
74 typedef short vrpn_int16;
75 typedef unsigned short vrpn_uint16;
76 typedef int vrpn_int32;
77 typedef unsigned int vrpn_uint32;
78 typedef float vrpn_float32;
79 typedef double vrpn_float64;
83 #define VRPN_ARCH linux 84 typedef char vrpn_int8;
85 typedef unsigned char vrpn_uint8;
86 typedef short vrpn_int16;
87 typedef unsigned short vrpn_uint16;
88 typedef int vrpn_int32;
89 typedef unsigned int vrpn_uint32;
90 typedef float vrpn_float32;
91 typedef double vrpn_float64;
96 typedef char vrpn_int8;
97 typedef unsigned char vrpn_uint8;
98 typedef short vrpn_int16;
99 typedef unsigned short vrpn_uint16;
100 typedef int vrpn_int32;
101 typedef unsigned int vrpn_uint32;
102 typedef float vrpn_float32;
103 typedef double vrpn_float64;
117 #define VRPN_ARCH _WIN32 118 typedef char vrpn_int8;
119 typedef unsigned char vrpn_uint8;
120 typedef short vrpn_int16;
121 typedef unsigned short vrpn_uint16;
122 typedef int vrpn_int32;
123 typedef unsigned int vrpn_uint32;
124 typedef float vrpn_float32;
125 typedef double vrpn_float64;
128 #if defined(FreeBSD) || defined(__FreeBSD__) 132 #define VRPN_ARCH FreeBSD 133 typedef char vrpn_int8;
134 typedef unsigned char vrpn_uint8;
135 typedef short vrpn_int16;
136 typedef unsigned short vrpn_uint16;
137 typedef int vrpn_int32;
138 typedef unsigned int vrpn_uint32;
139 typedef float vrpn_float32;
140 typedef double vrpn_float64;
144 #define VRPN_ARCH MacOSX 145 typedef char vrpn_int8;
146 typedef unsigned char vrpn_uint8;
147 typedef short vrpn_int16;
148 typedef unsigned short vrpn_uint16;
149 typedef int vrpn_int32;
150 typedef unsigned int vrpn_uint32;
151 typedef float vrpn_float32;
152 typedef double vrpn_float64;
158 #define VRPN_ARCH _WIN32 159 typedef char vrpn_int8;
160 typedef unsigned char vrpn_uint8;
161 typedef short vrpn_int16;
162 typedef unsigned short vrpn_uint16;
163 typedef int vrpn_int32;
164 typedef unsigned int vrpn_uint32;
165 typedef float vrpn_float32;
166 typedef double vrpn_float64;
171 #error Need to define architecture-dependent sizes in this file 183 typedef vrpn_int16 vrpn_bool;
185 const vrpn_int16 vrpn_true = 1;
186 const vrpn_int16 vrpn_false = 0;
187 const vrpn_int16 vrpn_TRUE = 1;
188 const vrpn_int16 vrpn_FALSE = 0;
189 const vrpn_int16 VRPN_TRUE = 1;
190 const vrpn_int16 VRPN_FALSE = 0;
223 #endif // VRPN_TYPES_H