C code will not compile using .NET

G

Guest

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
 
8

89fsg987g

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top