I was running some usermode code through prefast today, in 3790.1830,
and got a weird message about size_t being redefined. It works fine
during normal building, and prefast runs fine when I’m targeting x86,
but if I target amd64, I get these errors. Anyone recognize this? I
don’t really want to hack my headers just to make prefast happy.
Thanks.
-sd
1>errors in directory c:\dev\coverage
1>c:\winddk\3790.1830\inc\crt\string.h(59) : error C2371: ‘size_t’ :
redefinition; different basic types
1>Compiling - eventcb.cpp for AMD64
1>c:\winddk\3790.1830\inc\crt\string.h(59) : error C2371: ‘size_t’ :
redefinition; different basic types
1>Compiling - module.cpp for AMD64
1>c:\winddk\3790.1830\inc\crt\string.h(59) : error C2371: ‘size_t’ :
redefinition; different basic types
1>Compiling - symbol.cpp for AMD64
1>c:\winddk\3790.1830\inc\crt\string.h(59) : error C2371: ‘size_t’ :
redefinition; different basic types
1>Compiling - linecount.cpp for AMD64
1>c:\winddk\3790.1830\inc\crt\stdio.h(68) : error C2371: ‘size_t’ :
redefinition; different basic types
1>Compiling - commandline.cpp for AMD64
1>c:\winddk\3790.1830\inc\crt\stdio.h(68) : error C2371: ‘size_t’ :
redefinition; different basic types
1>Compiling - coverage.cpp for AMD64
1>Compiling - eventcb.cpp for AMD64
1>Compiling - module.cpp for AMD64
1>Compiling - symbol.cpp for AMD64
1>Compiling - linecount.cpp for AMD64
1>Compiling - commandline.cpp for AMD64
1>Compiling - generating code… for AMD64
BUILD: Compiling c:\dev\coverage directory
BUILD: Compile errors: not linking c:\dev\coverage directory
BUILD: Done
13 files compiled - 6 Errors
Error: The build command ‘build’ returned status ‘1’.
I asked one of the prefast for drivers devs and he had this to say:
d
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Steve Dispensa
Sent: Wednesday, October 19, 2005 8:52 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] amd64 crt prefast problem in 3790.1830
I was running some usermode code through prefast today, in 3790.1830, and got a weird message about size_t being redefined. It works fine during normal building, and prefast runs fine when I’m targeting x86, but if I target amd64, I get these errors. Anyone recognize this? I don’t really want to? hack my headers just to make prefast happy.
Thanks.
?-sd
1>errors in directory c:\dev\coverage
1>c:\winddk\3790.1830\inc\crt\string.h(59) : error C2371: ‘size_t’ : redefinition; different basic types
1>Compiling - eventcb.cpp for AMD64
1>c:\winddk\3790.1830\inc\crt\string.h(59) : error C2371: ‘size_t’ : redefinition; different basic types
1>Compiling - module.cpp for AMD64
1>c:\winddk\3790.1830\inc\crt\string.h(59) : error C2371: ‘size_t’ : redefinition; different basic types
1>Compiling - symbol.cpp for AMD64
1>c:\winddk\3790.1830\inc\crt\string.h(59) : error C2371: ‘size_t’ : redefinition; different basic types
1>Compiling - linecount.cpp for AMD64
1>c:\winddk\3790.1830\inc\crt\stdio.h(68) : error C2371: ‘size_t’ : redefinition; different basic types
1>Compiling - commandline.cpp for AMD64
1>c:\winddk\3790.1830\inc\crt\stdio.h(68) : error C2371: ‘size_t’ : redefinition; different basic types
1>Compiling - coverage.cpp for AMD64
1>Compiling - eventcb.cpp for AMD64
1>Compiling - module.cpp for AMD64
1>Compiling - symbol.cpp for AMD64
1>Compiling - linecount.cpp for AMD64
1>Compiling - commandline.cpp for AMD64
1>Compiling - generating code… for AMD64
BUILD: Compiling? c:\dev\coverage directory
BUILD: Compile errors: not linking c:\dev\coverage directory
BUILD: Done
? ? 13 files compiled - 6 Errors
Error: The build command ‘build’ returned status ‘1’.
Yeah, that’s what I wound up doing. Works like a charm as 32-bit.
Thanks for the response.
-sd
On Oct 20, 2005, at 1:57 AM, Doron Holan wrote:
I asked one of the prefast for drivers devs and he had this to say:
d
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Steve Dispensa
Sent: Wednesday, October 19, 2005 8:52 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] amd64 crt prefast problem in 3790.1830
I was running some usermode code through prefast today, in
3790.1830, and got a weird message about size_t being redefined. It
works fine during normal building, and prefast runs fine when I’m
targeting x86, but if I target amd64, I get these errors. Anyone
recognize this? I don’t really want to hack my headers just to
make prefast happy.
Thanks.
-sd
1>errors in directory c:\dev\coverage
1>c:\winddk\3790.1830\inc\crt\string.h(59) : error C2371:
‘size_t’ : redefinition; different basic types
1>Compiling - eventcb.cpp for AMD64
1>c:\winddk\3790.1830\inc\crt\string.h(59) : error C2371:
‘size_t’ : redefinition; different basic types
1>Compiling - module.cpp for AMD64
1>c:\winddk\3790.1830\inc\crt\string.h(59) : error C2371:
‘size_t’ : redefinition; different basic types
1>Compiling - symbol.cpp for AMD64
1>c:\winddk\3790.1830\inc\crt\string.h(59) : error C2371:
‘size_t’ : redefinition; different basic types
1>Compiling - linecount.cpp for AMD64
1>c:\winddk\3790.1830\inc\crt\stdio.h(68) : error C2371: ‘size_t’ :
redefinition; different basic types
1>Compiling - commandline.cpp for AMD64
1>c:\winddk\3790.1830\inc\crt\stdio.h(68) : error C2371: ‘size_t’ :
redefinition; different basic types
1>Compiling - coverage.cpp for AMD64
1>Compiling - eventcb.cpp for AMD64
1>Compiling - module.cpp for AMD64
1>Compiling - symbol.cpp for AMD64
1>Compiling - linecount.cpp for AMD64
1>Compiling - commandline.cpp for AMD64
1>Compiling - generating code… for AMD64
BUILD: Compiling c:\dev\coverage directory
BUILD: Compile errors: not linking c:\dev\coverage directory
BUILD: Done
13 files compiled - 6 Errors
Error: The build command ‘build’ returned status ‘1’.
For what it’s worth, it works fine with the 5112 WDK (prefast
2.1.4504). And it found a bug for me.
There are some hits in inc\crt\xlocale (pulled in from some STL
usage), but I’m sure they know about that. Otherwise it’s totally clean.
What a great tool.
-sd
On Oct 20, 2005, at 1:57 AM, Doron Holan wrote:
I asked one of the prefast for drivers devs and he had this to say:
d
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Steve Dispensa
Sent: Wednesday, October 19, 2005 8:52 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] amd64 crt prefast problem in 3790.1830
I was running some usermode code through prefast today, in
3790.1830, and got a weird message about size_t being redefined. It
works fine during normal building, and prefast runs fine when I’m
targeting x86, but if I target amd64, I get these errors. Anyone
recognize this? I don’t really want to hack my headers just to
make prefast happy.
Thanks.
-sd
1>errors in directory c:\dev\coverage
1>c:\winddk\3790.1830\inc\crt\string.h(59) : error C2371:
‘size_t’ : redefinition; different basic types
1>Compiling - eventcb.cpp for AMD64
1>c:\winddk\3790.1830\inc\crt\string.h(59) : error C2371:
‘size_t’ : redefinition; different basic types
1>Compiling - module.cpp for AMD64
1>c:\winddk\3790.1830\inc\crt\string.h(59) : error C2371:
‘size_t’ : redefinition; different basic types
1>Compiling - symbol.cpp for AMD64
1>c:\winddk\3790.1830\inc\crt\string.h(59) : error C2371:
‘size_t’ : redefinition; different basic types
1>Compiling - linecount.cpp for AMD64
1>c:\winddk\3790.1830\inc\crt\stdio.h(68) : error C2371: ‘size_t’ :
redefinition; different basic types
1>Compiling - commandline.cpp for AMD64
1>c:\winddk\3790.1830\inc\crt\stdio.h(68) : error C2371: ‘size_t’ :
redefinition; different basic types
1>Compiling - coverage.cpp for AMD64
1>Compiling - eventcb.cpp for AMD64
1>Compiling - module.cpp for AMD64
1>Compiling - symbol.cpp for AMD64
1>Compiling - linecount.cpp for AMD64
1>Compiling - commandline.cpp for AMD64
1>Compiling - generating code… for AMD64
BUILD: Compiling c:\dev\coverage directory
BUILD: Compile errors: not linking c:\dev\coverage directory
BUILD: Done
13 files compiled - 6 Errors
Error: The build command ‘build’ returned status ‘1’.
Sigh… itchy trigger finger… I was building in the x86 WLH
environment. When I tried as AMD64, the same errors came up.
Sorry for the confusion.
-sd
On Oct 20, 2005, at 9:41 PM, Steve Dispensa wrote:
For what it’s worth, it works fine with the 5112 WDK (prefast
2.1.4504). And it found a bug for me.
There are some hits in inc\crt\xlocale (pulled in from some STL
usage), but I’m sure they know about that. Otherwise it’s totally
clean.
What a great tool.
-sd
On Oct 20, 2005, at 1:57 AM, Doron Holan wrote:
> I asked one of the prefast for drivers devs and he had this to say:
>
> [quote]
> PREfast 2.1 isn’t rated or flight tested for x64 builds, and it’s
> quite possible that there needs to be some additional stuff done
> to get things to compile. It looks like it might be trying to
> apply a 32 bit compiler (that is, PREfast) with 64 bit ifdefs,
> which will cause exactly what you see here. (Well, mostly… the
> errors line 68 make no sense at all, but I suspect they’re some
> sort of cascade from the basic problem.)
>
> The recommendation is “compile 64 bit code in 32 bit mode,
> ifdefing out what you have to to make it compile on 32 bit”.
> [/quote]
>
> d
> ________________________________________
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Steve
> Dispensa
> Sent: Wednesday, October 19, 2005 8:52 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] amd64 crt prefast problem in 3790.1830
>
> I was running some usermode code through prefast today, in
> 3790.1830, and got a weird message about size_t being redefined.
> It works fine during normal building, and prefast runs fine when
> I’m targeting x86, but if I target amd64, I get these errors.
> Anyone recognize this? I don’t really want to hack my headers
> just to make prefast happy.
>
> Thanks.
>
> -sd
>
> -------
>
> 1>errors in directory c:\dev\coverage
> 1>c:\winddk\3790.1830\inc\crt\string.h(59) : error C2371:
> ‘size_t’ : redefinition; different basic types
> 1>Compiling - eventcb.cpp for AMD64
> 1>c:\winddk\3790.1830\inc\crt\string.h(59) : error C2371:
> ‘size_t’ : redefinition; different basic types
> 1>Compiling - module.cpp for AMD64
> 1>c:\winddk\3790.1830\inc\crt\string.h(59) : error C2371:
> ‘size_t’ : redefinition; different basic types
> 1>Compiling - symbol.cpp for AMD64
> 1>c:\winddk\3790.1830\inc\crt\string.h(59) : error C2371:
> ‘size_t’ : redefinition; different basic types
> 1>Compiling - linecount.cpp for AMD64
> 1>c:\winddk\3790.1830\inc\crt\stdio.h(68) : error C2371:
> ‘size_t’ : redefinition; different basic types
> 1>Compiling - commandline.cpp for AMD64
> 1>c:\winddk\3790.1830\inc\crt\stdio.h(68) : error C2371:
> ‘size_t’ : redefinition; different basic types
> 1>Compiling - coverage.cpp for AMD64
> 1>Compiling - eventcb.cpp for AMD64
> 1>Compiling - module.cpp for AMD64
> 1>Compiling - symbol.cpp for AMD64
> 1>Compiling - linecount.cpp for AMD64
> 1>Compiling - commandline.cpp for AMD64
> 1>Compiling - generating code… for AMD64
> BUILD: Compiling c:\dev\coverage directory
> BUILD: Compile errors: not linking c:\dev\coverage directory
> BUILD: Done
>
> 13 files compiled - 6 Errors
> Error: The build command ‘build’ returned status ‘1’.
>
> -------
>
>
> ----------------------------------
> Steve Dispensa
> MVP - Windows DDK
> www.kernelmustard.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at http://
> www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag
> argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at http://
> www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag
> argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>