我有编译成功的桌面项目,但是在向项目添加新配置以支持Windows Mobile平台之后,我收到以下错误:从winnt.h,winbase.h和excpt.h编译windows mobile项目的错误
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: 'PCONTEXT' : '_CONTEXT *' differs in levels of indirection from 'int' excpt.h
该项目不包括winnt.h,但它包括windows.h,windbase.h。我搜索谷歌,我必须改变项目属性 - >配置属性 - > C/C++ - >预处理器 - >定义添加像_MBCS,或添加$(ARCHFAM),$(ARCHFAM)。或者通过将windows.h放在其他头文件的顶部来更改我已经完成的头文件的顺序,但都不会修复错误。
任何建议,我可以解决这些问题?谢谢。
我对三个.cpp文件中的windows.h头文件进行了评论,这些都是我可以通过CTR-F找到的,但仍然存在相同数量的错误。 – Lufia
我的意思是我将这三个windows.h文件注释掉。 – Lufia
发布您的代码。 – johnathon