Sysprogs forums › Forums › VisualGDB › IntelliSense error with __null
- This topic has 11 replies, 4 voices, and was last updated 11 years, 1 month ago by Lonko.
-
AuthorPosts
-
October 30, 2013 at 13:35 #674DanParticipant
Hi, I am currently testing VisualGDB for the company I’m working for in order to program a STM32F4xx micro-controller on a PCB we designed. I could’ve gone with Atollic TrueSTUDIO or IAR embedded workbench, but I am really dependant on the IntelliSense plus we’ve been coding the rest of the application on Visual Studio 2010, so VisualGDB with the GNU toolchain was an obvious easy transition for me.
The problem is that I am developping the software in ANSI C and I suspect that some compiler definitions (preprocessing definitions) are missing. When I include
or or (well anything that uses ) and that I want to use the NULL definition, I get an IntelliSense error that __null is undefined because these lines in : #if defined (_STDDEF_H) || defined (__need_NULL)
#undef NULL /* in casehas defined it. */
#ifdef __GNUG__
#define NULL __null
#else /* G++ */
#ifndef __cplusplus
#define NULL ((void *)0)
#else /* C++ */
#define NULL 0
#endif /* C++ */
#endif /* G++ */
#endif /* NULL not defined andor need NULL. */
#undef __need_NULLLooked everywhere for the __null definition and couldn’ find it. I suppose it is a reserved word for GNUC. What should I do to remove that intelliSense error ?
Also, I seem to be unable to compile a single file without having to re-compile the whole project which I believe is absurd. Is there a way to go around that ?
October 30, 2013 at 22:14 #2740ketParticipantHi,
You can add a definition of __null for IntelliSense in the gcc_compat.h file located in the VisualGDB installation directory.
Normally make should compile only the changed files when compiling the project. If you are changing files included in many other files, then of course those files too need to be recompiled.
October 31, 2013 at 14:46 #2741DanParticipantGreat added to gcc_compat.h
#define __null 0
and I get no IntelliSense error, sweet thx.Indeed the makefile only recompiles the changed files, but what I meant is the “Build->Compile (Ctrl-F7)” from the Visual Studio main menu as well as the mouse’s context menu (right-click) “Compile (Ctrl-F7)” are grayed out. The shortcut is also disabled. This kinda sucks when you want to verify the compile success of only 1 source file when you’re modifying a bunch files altogether while merging projects and have to go through a makefile that will compile all the modified sources that you know will most probably cause compile errors and add useless compile time. So, is there a way to go around that missing feature ?
October 31, 2013 at 19:13 #2742ketParticipantHi,
We currently do not support compiling single files. We are considering adding support for it, but as it is a complicated feature to support for some of the project types, we may add support for it gradually.
As a workaround you could disable makefile auto-updating of SOURCEFILES temporarily (remove the #VisualGDB: AutoSourceFiles line from the Makefile) and use the Makefile to compile only the files you add to SOURCEFILES.
November 1, 2013 at 18:06 #2743DanParticipantOk great. Keep me informed when that feature is added, can’t wait to test it.
Great tool, keep it up and thx for everything 🙂
November 5, 2013 at 08:43 #2744LonkoParticipantHow about these intellisense errors:
3 IntelliSense: #error directive: “You need a ISO C conforming compiler to use the glibc headers” c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includesyscdefs.h 31 3
4 IntelliSense: declaration is incompatible with “double acos(double __x)” (declared at line 54) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 54 1
5 IntelliSense: declaration is incompatible with “double asin(double __x)” (declared at line 56) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 56 1
6 IntelliSense: declaration is incompatible with “double atan(double __x)” (declared at line 58) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 58 1
7 IntelliSense: declaration is incompatible with “double atan2(double __y, double __x)” (declared at line 60) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 60 1
8 IntelliSense: declaration is incompatible with “double cos(double __x)” (declared at line 63) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 63 1
9 IntelliSense: declaration is incompatible with “double sin(double __x)” (declared at line 65) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 65 1
10 IntelliSense: declaration is incompatible with “double tan(double __x)” (declared at line 67) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 67 1
11 IntelliSense: declaration is incompatible with “void sincos(double __x, double *__sinx, double *__cosx)” (declared at line 71) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 71 1
12 IntelliSense: declaration is incompatible with “double cosh(double __x)” (declared at line 78) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 78 1
13 IntelliSense: declaration is incompatible with “double sinh(double __x)” (declared at line 80) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 80 1
14 IntelliSense: declaration is incompatible with “double tanh(double __x)” (declared at line 82) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 82 1
15 IntelliSense: declaration is incompatible with “double acosh(double __x)” (declared at line 86) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 86 1
16 IntelliSense: declaration is incompatible with “double asinh(double __x)” (declared at line 88) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 88 1
17 IntelliSense: declaration is incompatible with “double atanh(double __x)” (declared at line 90) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 90 1
18 IntelliSense: declaration is incompatible with “double exp(double __x)” (declared at line 96) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 96 1
19 IntelliSense: declaration is incompatible with “double exp10(double __x)” (declared at line 100) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 100 1
20 IntelliSense: declaration is incompatible with “double pow10(double __x)” (declared at line 102) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 102 1
21 IntelliSense: declaration is incompatible with “double frexp(double __x, int *__exponent)” (declared at line 106) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 106 1
22 IntelliSense: declaration is incompatible with “double ldexp(double __x, int __exponent)” (declared at line 109) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 109 1
23 IntelliSense: declaration is incompatible with “double log(double __x)” (declared at line 112) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 112 1
24 IntelliSense: declaration is incompatible with “double log10(double __x)” (declared at line 115) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 115 1
25 IntelliSense: declaration is incompatible with “double modf(double __x, double *__iptr)” (declared at line 118) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 118 1
26 IntelliSense: declaration is incompatible with “double expm1(double __x)” (declared at line 122) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 122 1
27 IntelliSense: declaration is incompatible with “double log1p(double __x)” (declared at line 125) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 125 1
28 IntelliSense: declaration is incompatible with “double logb(double __x)” (declared at line 128) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 128 1
29 IntelliSense: declaration is incompatible with “double exp2(double __x)” (declared at line 133) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 133 1
30 IntelliSense: declaration is incompatible with “double log2(double __x)” (declared at line 136) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 136 1
31 IntelliSense: declaration is incompatible with “double pow(double __x, double __y)” (declared at line 143) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 143 1
32 IntelliSense: declaration is incompatible with “double sqrt(double __x)” (declared at line 146) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 146 1
33 IntelliSense: declaration is incompatible with “double hypot(double __x, double __y)” (declared at line 150) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 150 1
34 IntelliSense: declaration is incompatible with “double cbrt(double __x)” (declared at line 155) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 155 1
35 IntelliSense: declaration is incompatible with “double ceil(double __x)” (declared at line 162) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 162 1
36 IntelliSense: declaration is incompatible with “double fabs(double __x)” (declared at line 165) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 165 1
37 IntelliSense: declaration is incompatible with “double floor(double __x)” (declared at line 168) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 168 1
38 IntelliSense: declaration is incompatible with “double fmod(double __x, double __y)” (declared at line 171) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 171 1
39 IntelliSense: declaration is incompatible with “int __isinf(double __value)” (declared at line 176) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 176 1
40 IntelliSense: declaration is incompatible with “int __finite(double __value)” (declared at line 179) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 179 1
41 IntelliSense: declaration is incompatible with “int isinf(double __value)” (declared at line 184) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 184 1
42 IntelliSense: declaration is incompatible with “int finite(double __value)” (declared at line 187) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 187 1
43 IntelliSense: declaration is incompatible with “double drem(double __x, double __y)” (declared at line 190) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 190 1
44 IntelliSense: declaration is incompatible with “double significand(double __x)” (declared at line 194) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 194 1
45 IntelliSense: declaration is incompatible with “double copysign(double __x, double __y)” (declared at line 199) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 199 1
46 IntelliSense: declaration is incompatible with “double nan(const char *__tagb)” (declared at line 204) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 204 1
47 IntelliSense: declaration is incompatible with “int __isnan(double __value)” (declared at line 209) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 209 1
48 IntelliSense: declaration is incompatible with “int isnan(double __value)” (declared at line 213) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 213 1
49 IntelliSense: declaration is incompatible with “double j0(double)” (declared at line 216) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 216 1
50 IntelliSense: declaration is incompatible with “double j1(double)” (declared at line 217) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 217 1
51 IntelliSense: declaration is incompatible with “double jn(int, double)” (declared at line 218) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 218 1
52 IntelliSense: declaration is incompatible with “double y0(double)” (declared at line 219) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 219 1
53 IntelliSense: declaration is incompatible with “double y1(double)” (declared at line 220) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 220 1
54 IntelliSense: declaration is incompatible with “double yn(int, double)” (declared at line 221) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 221 1
55 IntelliSense: declaration is incompatible with “double erf(double)” (declared at line 227) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 227 1
56 IntelliSense: declaration is incompatible with “double erfc(double)” (declared at line 228) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 228 1
57 IntelliSense: declaration is incompatible with “double lgamma(double)” (declared at line 229) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 229 1
58 IntelliSense: declaration is incompatible with “double tgamma(double)” (declared at line 233) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 233 1
59 IntelliSense: declaration is incompatible with “double gamma(double)” (declared at line 238) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 238 1
60 IntelliSense: expected a ‘;’ c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 245 1
61 IntelliSense: declaration is incompatible with “double rint(double __x)” (declared at line 252) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 252 1
62 IntelliSense: declaration is incompatible with “double nextafter(double __x, double __y)” (declared at line 255) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 255 1
63 IntelliSense: declaration is incompatible with “double nexttoward(double __x, long double __y)” (declared at line 257) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 257 1
64 IntelliSense: declaration is incompatible with “double remainder(double __x, double __y)” (declared at line 261) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 261 1
65 IntelliSense: declaration is incompatible with “double scalb(double __x, double __n)” (declared at line 265) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 265 1
66 IntelliSense: declaration is incompatible with “double scalbn(double __x, int __n)” (declared at line 270) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 270 1
67 IntelliSense: declaration is incompatible with “int ilogb(double __x)” (declared at line 274) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 274 1
68 IntelliSense: declaration is incompatible with “double scalbln(double __x, long __n)” (declared at line 279) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 279 1
69 IntelliSense: declaration is incompatible with “double nearbyint(double __x)” (declared at line 283) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 283 1
70 IntelliSense: declaration is incompatible with “double round(double __x)” (declared at line 287) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 287 1
71 IntelliSense: declaration is incompatible with “double trunc(double __x)” (declared at line 291) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 291 1
72 IntelliSense: declaration is incompatible with “double remquo(double __x, double __y, int *__quo)” (declared at line 296) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 296 1
73 IntelliSense: declaration is incompatible with “long lrint(double __x)” (declared at line 303) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 303 1
74 IntelliSense: declaration is incompatible with “long long llrint(double __x)” (declared at line 304) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 304 1
75 IntelliSense: declaration is incompatible with “long lround(double __x)” (declared at line 308) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 308 1
76 IntelliSense: declaration is incompatible with “long long llround(double __x)” (declared at line 309) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 309 1
77 IntelliSense: declaration is incompatible with “double fdim(double __x, double __y)” (declared at line 313) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 313 1
78 IntelliSense: declaration is incompatible with “double fmax(double __x, double __y)” (declared at line 316) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 316 1
79 IntelliSense: declaration is incompatible with “double fmin(double __x, double __y)” (declared at line 319) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 319 1
80 IntelliSense: declaration is incompatible with “int __fpclassify(double __value)” (declared at line 323) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 323 1
81 IntelliSense: declaration is incompatible with “int __signbit(double __value)” (declared at line 327) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 327 1
82 IntelliSense: declaration is incompatible with “double fma(double __x, double __y, double __z)” (declared at line 332) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 002sys-includebitsmathcalls.h 332 1
83 IntelliSense: the global scope has no “acosf” c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 001c++cmath 107 13
84 IntelliSense: the global scope has no “asinf” c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 001c++cmath 110 13
85 IntelliSense: the global scope has no “atanf” c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 001c++cmath 113 13
86 IntelliSense: the global scope has no “atan2f” c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 001c++cmath 116 13
87 IntelliSense: the global scope has no “ceilf” c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 001c++cmath 119 13
88 IntelliSense: the global scope has no “coshf” c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 001c++cmath 122 13
89 IntelliSense: the global scope has no “expf” c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 001c++cmath 125 13
90 IntelliSense: the global scope has no “floorf” c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 001c++cmath 128 13
91 IntelliSense: the global scope has no “fmodf” c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 001c++cmath 131 13
92 IntelliSense: the global scope has no “frexpf” c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 001c++cmath 134 13
93 IntelliSense: the global scope has no “ldexpf” c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 001c++cmath 137 13
94 IntelliSense: the global scope has no “logf” c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 001c++cmath 140 13
95 IntelliSense: the global scope has no “log10f” c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 001c++cmath 143 13
96 IntelliSense: the global scope has no “modff” c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 001c++cmath 146 13
97 IntelliSense: the global scope has no “powf” c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 001c++cmath 149 13
98 IntelliSense: the global scope has no “sinhf” c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 001c++cmath 152 13
99 IntelliSense: the global scope has no “tanf” c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 001c++cmath 155 13
100 IntelliSense: the global scope has no “tanhf” c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 001c++cmath 158 13
101 IntelliSense: declaration is incompatible with “float acos” (declared at line 190) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 001c++cmath 197 3
102 IntelliSense: declaration is incompatible with “float asin” (declared at line 200) c:usersuporabnikappdatalocalvisualgdbremotesourcecache192.168.3.207 001c++cmath 204 3November 6, 2013 at 21:14 #2745ketParticipantHi,
Are you looking into kernel sources? What libraries and includes are you using i.e. how could we reproduce the same errors on our side?
November 7, 2013 at 06:07 #2746LonkoParticipantOh found where the problem exists, until i have cdefs.h file open i have all those errros.
But why i went to the file in the first place is because of the anoying
/* The GNU libc does not support any K&R compilers or the traditional mode
of ISO C compilers anymore. Check for some of the combinations not
anymore supported. */
#if defined __GNUC__ && !defined __STDC__
# error “You need a ISO C conforming compiler to use the glibc headers”
#endifand it is because __STDC__ is not defined. is this normal?
Can i define it?Regards,
November 8, 2013 at 07:02 #2747supportKeymasterThis is strange. __STDC__ should be defined in a gcc_Debug.h file in your project directory and this file should be added to ‘forced includes’ in Visual Studio project properties. Could you please recheck whether the file contains the __STDC__ and whether it’s parsed by IntelliSense?
November 8, 2013 at 08:51 #2748LonkoParticipantin gcc_Debug.h is only #define __STDC_HOSTED__ 1
and no __STDC__ and intellisense does not parse it.
What is more strange is that intellisense does not find some of the header files that are in the local cache.
For example it cannot find #include “svc_uif.h” but compilation goes ok. The file is located in C:UsersUporabnikAppDataLocalVisualGDBRemoteSourceCache192.168.3.207 005includesvc_uif.h but for some reason intellisense does not pick up the file!also in gcc_Debug.h
// — Include directories begin — //
//all includes are commented so no includes listed here!Also it nags about redefinition of DEBUG
This is the whole gcc_Debug.h
/*
This file is only used by IntelliSense (VisualStudio code suggestion system)
DO NOT INCLUDE THIS FILE FROM YOUR ACTUAL SOURCE FILES.
This file lists the preprocessor macros extracted from your GCC.
It is needed for IntelliSense to parse other header files correctly.
*/
#ifdef _MSC_VER
#define __DBL_MIN_EXP__ (-1021)
#define __FLT_MIN__ 1.17549435e-38F
#define __CHAR_BIT__ 8
#define __WCHAR_MAX__ 2147483647
#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
#define __FLT_EVAL_METHOD__ 0
#define __unix__ 1
#define unix 1
#define __SIZE_TYPE__ unsigned int
#define DEBUG 1
#define __ELF__ 1
#define __DBL_MIN_10_EXP__ (-307)
#define __FINITE_MATH_ONLY__ 0
#define __ARMEL__ 1
#define __GNUC_PATCHLEVEL__ 3
#define __FLT_RADIX__ 2
#define __LDBL_EPSILON__ 2.2204460492503131e-16L
#define __SHRT_MAX__ 32767
#define __LDBL_MAX__ 1.7976931348623157e+308L
#define __linux 1
#define __CHAR_UNSIGNED__ 1
#define __LDBL_MAX_EXP__ 1024
#define __LONG_MAX__ 2147483647L
#define __linux__ 1
#define __unix 1
#define __SCHAR_MAX__ 127
#define __DBL_DIG__ 15
#define __USER_LABEL_PREFIX__
#define linux 1
#define __STDC_HOSTED__ 1
#define __EXCEPTIONS 1
#define __LDBL_MANT_DIG__ 53
#define __FLT_EPSILON__ 1.19209290e-7F
#define __APCS_32__ 1
#define __GXX_WEAK__ 1
#define __LDBL_MIN__ 2.2250738585072014e-308L
#define __WCHAR_TYPE__ long int
#define __FLT_DIG__ 6
#define __FLT_MAX_10_EXP__ 38
#define __INT_MAX__ 2147483647
#define __gnu_linux__ 1
#define __FLT_MAX_EXP__ 128
#define __DECIMAL_DIG__ 17
#define __DBL_MANT_DIG__ 53
#define __WINT_TYPE__ unsigned int
#define __GNUC__ 3
#define __LDBL_MIN_EXP__ (-1021)
#define __arm__ 1
#define __LDBL_MAX_10_EXP__ 308
#define __DBL_EPSILON__ 2.2204460492503131e-16
#define __DBL_MAX__ 1.7976931348623157e+308
#define __cplusplus 1
#define __USING_SJLJ_EXCEPTIONS__ 1
#define __DEPRECATED 1
#define __DBL_MAX_EXP__ 1024
#define __FLT_DENORM_MIN__ 1.40129846e-45F
#define __GNUG__ 3
#define __LONG_LONG_MAX__ 9223372036854775807LL
#define __FLT_MAX__ 3.40282347e+38F
#define __GXX_ABI_VERSION 102
#define __FLT_MIN_10_EXP__ (-37)
#define __FLT_MIN_EXP__ (-125)
#define __GNUC_MINOR__ 3
#define __DBL_MAX_10_EXP__ 308
#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
#define __DBL_MIN__ 2.2250738585072014e-308
#define __ARM_ARCH_4T__ 1
#define __PTRDIFF_TYPE__ int
#define __LDBL_MIN_10_EXP__ (-307)
#define __REGISTER_PREFIX__
#define __LDBL_DIG__ 15
#define __NO_INLINE__ 1
#define _GNU_SOURCE 1
#define __FLT_MANT_DIG__ 24
#define __VERSION__ “3.3.4”
#endif// — Include directories begin — //
///usr/sa/include
///usr/sa/include/mps
///usr/sa/include/uis
///usr/samoa/tools/toolchain/arm-linux-uclibc/include/c++
///usr/samoa/tools/toolchain/arm-linux-uclibc/include/c++/arm-linux-uclibc
///usr/samoa/tools/toolchain/arm-linux-uclibc/include/c++/backward
///usr/samoa/tools/toolchain/lib/gcc-lib/arm-linux-uclibc/3.3.4/include
///usr/samoa/tools/toolchain/arm-linux-uclibc/sys-include
// — Library directories end — //// — Library directories begin — //
// — Library directories begin — //November 12, 2013 at 03:53 #2749supportKeymasterThe compilation and IntelliSense use two independent source parsing mechanisms, so it could happen that IntelliSense shows false positive errors when its mechanism runs out of sync with the build mechanism.
Regarding svc_uif.h file, is C:UsersUporabnikAppDataLocalVisualGDBRemoteSourceCache192.168.3.207 005include referenced in Include Search Path (Visual Studio Project Properties -> NMake -> Include Search Path)?If __STDC__ is not present in the .h file, this can be happening because GCC does not report it when being tested with your configuration settings. This can be specific to your GCC version or some settings. The easiest workaround would be to create a new file (e.g. called gccfix.h), add it to ‘forced includes’ in Visual Studio Project Properties -> NMake and add the following code to it:
#ifdef _MSC_VER #define __STDC__ #endif
This should provide IntelliSense with the missing definitions. _MSC_VER is a macro that is defined by Microsoft Compiler (and Microsoft IntelliSense engine) and won’t be present during build with GCC.
November 22, 2013 at 07:06 #2750LonkoParticipantYou are correct the cached include folder was not in the NMAKE options!
Now the errors are gone but somehow intellisense sometimes show limits and all the errors in it but that will be survivable 😀Thank you!
-
AuthorPosts
- You must be logged in to reply to this topic.