Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / General / February 2005

Tip: Looking for answers? Try searching our database.

C code will not compile using .NET

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DazedAndConfused - 25 Feb 2005 13:49 GMT
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?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.