Error In Winnt.h
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Weird compile error dealing with Winnt.h up vote 2 down vote favorite When trying to compile a file that include winnt.h via windows.h, I get the following error: MyGl.cpp ..\microsoft sdks\windows\v6.0a\include\winnt.h(964) : error C2988: unrecognizable template declaration/definition ..\microsoft sdks\windows\v6.0a\include\winnt.h(964) : error C2059: syntax error : '&' They point to the following lines in Winnt.h extern "C++" // templates cannot be declared to have 'C' linkage template
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Compile errors from winnt.h, winbase.h, and excpt.h for windows mobile project up vote 1 http://stackoverflow.com/questions/257134/weird-compile-error-dealing-with-winnt-h down vote favorite 1 I have desktop project which is compiled successfully, but after I add new configuration to the project to support Windows Mobile platforms, I receive the following errors: error C2146: syntax error : missing ';' before identifier 'ContextRecord' winnt.h error C4430: missing type specifier - int assumed. Note: C++ does not support default-int winnt.h error C2146: syntax error : missing ';' before identifier 'LPCONTEXT' winbase.h error C2040: http://stackoverflow.com/questions/10543242/compile-errors-from-winnt-h-winbase-h-and-excpt-h-for-windows-mobile-project 'PCONTEXT' : '_CONTEXT *' differs in levels of indirection from 'int' excpt.h The project does not include winnt.h, but it includes windows.h, windbase.h. I search on google that I have to change Project properties->configuration properties->C/C++->Preprocessor->definitions to add like _MBCS, or add $(ARCHFAM), $(ARCHFAM). Or change the order of the header files which I have done that too by putting windows.h on the top of other header files, but all not fixing the errors. Any suggestion that I can fix these? thanks. c++ windows mobile share|improve this question asked May 10 '12 at 22:53 Lufia 55213 add a comment| 3 Answers 3 active oldest votes up vote 2 down vote #include
Wi-Fi 802.11n Wi-Fi with MCU Automotive Wi-Fi Bluetooth Low Energy (BLE) All Wireless Devices MCU and PSoC Families Traveo 32-bit ARM Automotive MCUs FM4 32-bit ARM Cortex MCUs PSoC 32-bit ARM Cortex MCUs PSoC 8-bit MCUs 16-bit and 8-bit MCUs http://www.cypress.com/forum/usb-known-problems-and-solutions/solution-compilation-error-visual-studio-c-when-including PSoC® Software All FM and PSoC MCUs Touch Sensing (CapSense) CapSense Controllers TrueTouch https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/fb2c5963-84a2-4aa0-b7ed-cea82b2aaaba/errors-in-winnth-file-using-visual-c-2005-express-edition-and-mar-15-sdk?forum=windowsgeneraldevelopmentissues Fingerprint Reader Universal Serial Bus (USB) USB Type-C and Power Delivery USB SuperSpeed Hubs USB SuperSpeed Peripherals USB Hi-Speed Hubs USB Hi-Speed Peripherals All USB Devices Power Management ICs Energy Harvesting PMICs Automotive LED Drivers Automotive PMICs Standard PMICs LED Lighting Driver ICs Voltage Supervisor ICs Battery Charger ICs Easy error in DesignSim Memory Serial NOR Flash Parallel NOR Flash HyperFlash HyperRAM SLC NAND Flash Nonvolatile RAM Asynchronous SRAM Synchronous SRAM All Memory Devices Clocks & Buffers Interface Applications Internet of Things (IoT) Aerospace & Defense Automotive Solutions CapSense for Automotive Infotainment Applications CapSense for Automotive non-infotainment applications Motor Control HVAC Passive Keyless Entry Switch Touch screen and track pad solutions for Automotive Infotainment applications error in winnt.h Ultrasonic Parking Assistance System Home Appliance Induction Cooker Espresso Machine Microwave HEMS Controller Medical Infusion Pump Fertility Monitor Blood Pressure Monitor Blood Glucose Meter Pulse Oximeter Consumer Electronics Power Bank LED Projector 3D Active Shutter Glasses iPod, iPhone and iPad Accessories USB 3.0 HD Video Streaming Wearables Fitness Monitor Communications & Telecom Smart Meter Power Supervision CFP Management Interface Thermal Management Industrial Brushless DC Motor (BLDC) Permanent Magnet Synchronous Motor Stepper FA (Inverter) FA (PLC) Magnetic Card Reader Temperature Sensing & Control Wireless RF Remote Control Wireless HID R/C Models and Toys Wi-Fi Over The Air Reference Design Design Support Support Cypress Developer Community WICED IoT Community Customer Support Create a Support Case Knowledge Base Sales Offices Customer Care Competitor Cross Reference Design Partners WICED IoT Partners Report a Website Problem Training Design Workshops Video Tutorials Events University Alliance Video Library Blogs Quality Quality and Reliability Packaging Product Change Notices RoHS Compliance Software & Tools Software and Drivers Code Examples WICED Software PSoC Creator EZ-USB FX3 SDK Development Kits Reference designs Documentation Document Search Product Roadmaps Application Notes Datasheets Product Selector Guide Bluetooth Low Energy (BLE) Programmable System
Studio 2015 products Visual Studio Team Services Visual Studio Code Visual Studio Dev Essentials Office Office Word/Excel/PowerPoint Microsoft Graph Outlook OneDrive/Sharepoint Skype Services Store Cortana Bing Application Insights Languages & platforms Xamarin ASP.NET C++ TypeScript .NET - VB, C#, F# Server Windows Server SQL Server BizTalk Server SharePoint Dynamics Programs & communities Students Startups Forums MSDN Subscriber downloads Sign in Search Microsoft Search Windows Dev Center Windows Dev Center Explore What’s new for Windows 10 Intro to Universal Windows Platform Coding challenges Develop for accessibility Build for enterprise Windows Store opportunities Docs Windows apps Get started Design and UI Develop API reference Publish Monetize Promote Games Get started UI design Develop Publish Desktop Get started Design Develop API reference Test and deploy Compatibility Windows IoT Microsoft Edge Windows Holographic Downloads Samples Support Why Windows Dashboard Explore What’s new for Windows 10 Intro to Universal Windows Platform Coding challenges Develop for accessibility Build for enterprise Windows Store opportunities Docs Windows apps Get started Design and UI Develop API reference Publish Monetize Promote Games Get started UI design Develop Publish Desktop Get started Design Develop API reference Test and deploy Compatibility Windows IoT Microsoft Edge Windows Holographic Downloads Samples Support Why Windows Dashboard Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Asked by: Errors in winnt.h file using visual c++ 2005 express edition and mar. 15 sdk Windows Desktop Development > General Windows Desktop Development Issues Question 0 Sign in to vote Hello. I get the following errors when I try to include winnt.h in my code. I tried using the newest sdk as w