I have legacy C code that I'm able to compile using VS6 using the following
command:
"cl -GX -O2 -DMSWIN32 -DNDEBUG -D_WINDOWS -c mycode.c"
When I run this same command using the VS .NET 2003 command prompt I receive
this error:
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\Include\WinNT.h(5857) : error C2208: 'BYTE' : no members
defined using this type
I know these type of errors are common when porting C code over to C++ but
why does it compile fine using VS6 but not in VS7? Anyone have any
suggestions/comments? Thanks in advance.
Regards,
DazedAndConfused
89fsg987g@dskjfkdsfj.com - 26 Feb 2005 05:03 GMT
That's a strange one. Looks like the compiler is applying C++ rules to the
the embedded structs in WinNT.h. Have you tried using the -TC option at the
end of your command to force the compiler to understand this is standard c?
DazedAndConfused - 28 Feb 2005 13:33 GMT
Yes - I have tried using -Tc and -TC without success.
> That's a strange one. Looks like the compiler is applying C++ rules to the
> the embedded structs in WinNT.h. Have you tried using the -TC option at the
> end of your command to force the compiler to understand this is standard c?