为什么我的vc++6.0无法Include<windows.h>
本帖最后由 牡丹花下死做鬼 于 2014-7-19 22:22 编辑一旦写上
#include<windows.h>
就出错提示是
--------------------Configuration: 测试_C - Win32 Debug--------------------
Compiling...
测试.c
d:\program files\microsoft visual studio\vc98\include\windef.h(171) : error C2061: syntax error : identifier 'LPARAM'
d:\program files\microsoft visual studio\vc98\include\windef.h(171) : error C2059: syntax error : ';'
d:\program files\microsoft visual studio\vc98\include\windef.h(172) : error C2061: syntax error : identifier 'LRESULT'
d:\program files\microsoft visual studio\vc98\include\windef.h(172) : error C2059: syntax error : ';'
d:\program files\microsoft visual studio\vc98\include\windef.h(204) : error C2143: syntax error : missing '{' before '*'
d:\program files\microsoft visual studio\vc98\include\windef.h(205) : error C2143: syntax error : missing '{' before '*'
d:\program files\microsoft visual studio\vc98\include\windef.h(206) : error C2061: syntax error : identifier 'HGLOBAL'
d:\program files\microsoft visual studio\vc98\include\windef.h(206) : error C2059: syntax error : ';'
d:\program files\microsoft visual studio\vc98\include\windef.h(207) : error C2061: syntax error : identifier 'HLOCAL'
d:\program files\microsoft visual studio\vc98\include\windef.h(207) : error C2059: syntax error : ';'
d:\program files\microsoft visual studio\vc98\include\windef.h(208) : error C2061: syntax error : identifier 'GLOBALHANDLE'
d:\program files\microsoft visual studio\vc98\include\windef.h(208) : error C2059: syntax error : ';'
d:\program files\microsoft visual studio\vc98\include\windef.h(209) : error C2061: syntax error : identifier 'LOCALHANDLE'
d:\program files\microsoft visual studio\vc98\include\windef.h(209) : error C2059: syntax error : ';'
d:\program files\microsoft visual studio\vc98\include\windef.h(253) : error C2061: syntax error : identifier 'HMODULE'
d:\program files\microsoft visual studio\vc98\include\windef.h(253) : error C2059: syntax error : ';'
d:\program files\microsoft visual studio\vc98\include\windef.h(275) : error C2061: syntax error : identifier 'HCURSOR'
d:\program files\microsoft visual studio\vc98\include\windef.h(275) : error C2059: syntax error : ';'
d:\program files\microsoft visual studio\vc98\include\windef.h(288) : error C2061: syntax error : identifier 'LONG'
d:\program files\microsoft visual studio\vc98\include\windef.h(289) : error C2061: syntax error : identifier 'top'
d:\program files\microsoft visual studio\vc98\include\windef.h(289) : error C2059: syntax error : ';'
d:\program files\microsoft visual studio\vc98\include\windef.h(290) : error C2061: syntax error : identifier 'right'
d:\program files\microsoft visual studio\vc98\include\windef.h(290) : error C2059: syntax error : ';'
d:\program files\microsoft visual studio\vc98\include\windef.h(291) : error C2061: syntax error : identifier 'bottom'
d:\program files\microsoft visual studio\vc98\include\windef.h(291) : error C2059: syntax error : ';'
d:\program files\microsoft visual studio\vc98\include\windef.h(292) : error C2059: syntax error : '}'
d:\program files\microsoft visual studio\vc98\include\windef.h(294) : error C2143: syntax error : missing '{' before '*'
d:\program files\microsoft visual studio\vc98\include\windef.h(298) : error C2061: syntax error : identifier 'LONG'
d:\program files\microsoft visual studio\vc98\include\windef.h(299) : error C2061: syntax error : identifier 'top'
d:\program files\microsoft visual studio\vc98\include\windef.h(299) : error C2059: syntax error : ';'
d:\program files\microsoft visual studio\vc98\include\windef.h(300) : error C2061: syntax error : identifier 'right'
d:\program files\microsoft visual studio\vc98\include\windef.h(300) : error C2059: syntax error : ';'
d:\program files\microsoft visual studio\vc98\include\windef.h(301) : error C2061: syntax error : identifier 'bottom'
d:\program files\microsoft visual studio\vc98\include\windef.h(301) : error C2059: syntax error : ';'
d:\program files\microsoft visual studio\vc98\include\windef.h(302) : error C2059: syntax error : '}'
d:\program files\microsoft visual studio\vc98\include\windef.h(304) : error C2143: syntax error : missing '{' before '*'
d:\program files\microsoft visual studio\vc98\include\windef.h(308) : error C2061: syntax error : identifier 'LONG'
d:\program files\microsoft visual studio\vc98\include\windef.h(309) : error C2061: syntax error : identifier 'y'
d:\program files\microsoft visual studio\vc98\include\windef.h(309) : error C2059: syntax error : ';'
d:\program files\microsoft visual studio\vc98\include\windef.h(310) : error C2059: syntax error : '}'
d:\program files\microsoft visual studio\vc98\include\windef.h(314) : error C2061: syntax error : identifier 'LONG'
d:\program files\microsoft visual studio\vc98\include\windef.h(315) : error C2061: syntax error : identifier 'y'
d:\program files\microsoft visual studio\vc98\include\windef.h(315) : error C2059: syntax error : ';'
d:\program files\microsoft visual studio\vc98\include\windef.h(316) : error C2059: syntax error : '}'
d:\program files\microsoft visual studio\vc98\include\windef.h(320) : error C2061: syntax error : identifier 'LONG'
d:\program files\microsoft visual studio\vc98\include\windef.h(321) : error C2061: syntax error : identifier 'cy'
d:\program files\microsoft visual studio\vc98\include\windef.h(321) : error C2059: syntax error : ';'
d:\program files\microsoft visual studio\vc98\include\windef.h(322) : error C2059: syntax error : '}'
d:\program files\microsoft visual studio\vc98\include\windef.h(324) : error C2061: syntax error : identifier 'SIZEL'
d:\program files\microsoft visual studio\vc98\include\windef.h(324) : error C2059: syntax error : ';'
d:\program files\microsoft visual studio\vc98\include\windef.h(325) : error C2143: syntax error : missing '{' before '*'
d:\program files\microsoft visual studio\vc98\include\windef.h(330) : error C2061: syntax error : identifier 'SHORT'
d:\program files\microsoft visual studio\vc98\include\windef.h(331) : error C2061: syntax error : identifier 'y'
d:\program files\microsoft visual studio\vc98\include\windef.h(331) : error C2059: syntax error : ';'
d:\program files\microsoft visual studio\vc98\include\windef.h(336) : error C2059: syntax error : '}'
d:\program files\microsoft visual studio\vc98\include\winbase.h(220) : error C2061: syntax error : identifier 'HANDLE'
d:\program files\microsoft visual studio\vc98\include\winbase.h(221) : error C2059: syntax error : '}'
d:\program files\microsoft visual studio\vc98\include\winbase.h(230) : error C2061: syntax error : identifier 'HANDLE'
d:\program files\microsoft visual studio\vc98\include\winbase.h(231) : error C2061: syntax error : identifier 'hThread'
d:\program files\microsoft visual studio\vc98\include\winbase.h(231) : error C2059: syntax error : ';'
d:\program files\microsoft visual studio\vc98\include\winbase.h(234) : error C2059: syntax error : '}'
d:\program files\microsoft visual studio\vc98\include\winbase.h(272) : error C2061: syntax error : identifier 'CRITICAL_SECTION'
d:\program files\microsoft visual studio\vc98\include\winbase.h(272) : error C2059: syntax error : ';'
d:\program files\microsoft visual studio\vc98\include\winbase.h(273) : error C2061: syntax error : identifier 'PCRITICAL_SECTION'
d:\program files\microsoft visual studio\vc98\include\winbase.h(273) : error C2059: syntax error : ';'
d:\program files\microsoft visual studio\vc98\include\winbase.h(274) : error C2061: syntax error : identifier 'LPCRITICAL_SECTION'
d:\program files\microsoft visual studio\vc98\include\winbase.h(274) : error C2059: syntax error : ';'
d:\program files\microsoft visual studio\vc98\include\winbase.h(276) : error C2061: syntax error : identifier 'CRITICAL_SECTION_DEBUG'
d:\program files\microsoft visual studio\vc98\include\winbase.h(276) : error C2059: syntax error : ';'
d:\program files\microsoft visual studio\vc98\include\winbase.h(277) : error C2061: syntax error : identifier 'PCRITICAL_SECTION_DEBUG'
d:\program files\microsoft visual studio\vc98\include\winbase.h(277) : error C2059: syntax error : ';'
d:\program files\microsoft visual studio\vc98\include\winbase.h(278) : error C2061: syntax error : identifier 'LPCRITICAL_SECTION_DEBUG'
d:\program files\microsoft visual studio\vc98\include\winbase.h(278) : error C2059: syntax error : ';'
d:\program files\microsoft visual studio\vc98\include\winbase.h(281) : error C2061: syntax error : identifier 'LPLDT_ENTRY'
d:\program files\microsoft visual studio\vc98\include\winbase.h(281) : error C2059: syntax error : ';'
d:\program files\microsoft visual studio\vc98\include\winbase.h(408) : error C2061: syntax error : identifier 'WCHAR'
d:\program files\microsoft visual studio\vc98\include\winbase.h(409) : error C2059: syntax error : '}'
d:\program files\microsoft visual studio\vc98\include\winbase.h(494) : error C2061: syntax error : identifier 'WCHAR'
d:\program files\microsoft visual studio\vc98\include\winbase.h(495) : error C2059: syntax error : '}'
d:\program files\microsoft visual studio\vc98\include\winbase.h(641) : error C2061: syntax error : identifier 'EXCEPTION_RECORD'
d:\program files\microsoft visual studio\vc98\include\winbase.h(643) : error C2059: syntax error : '}'
d:\program files\microsoft visual studio\vc98\include\winbase.h(646) : error C2061: syntax error : identifier 'HANDLE'
d:\program files\microsoft visual studio\vc98\include\winbase.h(649) : error C2059: syntax error : '}'
d:\program files\microsoft visual studio\vc98\include\winbase.h(652) : error C2061: syntax error : identifier 'HANDLE'
d:\program files\microsoft visual studio\vc98\include\winbase.h(653) : error C2061: syntax error : identifier 'hProcess'
d:\program files\microsoft visual studio\vc98\include\winbase.h(653) : error C2059: syntax error : ';'
d:\program files\microsoft visual studio\vc98\include\winbase.h(654) : error C2061: syntax error : identifier 'hThread'
d:\program files\microsoft visual studio\vc98\include\winbase.h(654) : error C2059: syntax error : ';'
d:\program files\microsoft visual studio\vc98\include\winbase.h(662) : error C2059: syntax error : '}'
d:\program files\microsoft visual studio\vc98\include\winbase.h(673) : error C2061: syntax error : identifier 'HANDLE'
d:\program files\microsoft visual studio\vc98\include\winbase.h(679) : error C2059: syntax error : '}'
d:\program files\microsoft visual studio\vc98\include\winbase.h(686) : error C2061: syntax error : identifier 'LPSTR'
d:\program files\microsoft visual studio\vc98\include\winbase.h(689) : error C2059: syntax error : '}'
d:\program files\microsoft visual studio\vc98\include\winbase.h(701) : fatal error C1046: compiler limit : union nested too deeply
执行 cl.exe 时出错.
测试.obj - 1 error(s), 0 warning(s)
表示这个头文件我从小溪那拷贝过来了还是一样
@仰望天上的光 @小布丁 @小甲鱼 @拈花小仙 @怡静 @Angel丶L @沉ジ寞
{:7_181:}把项目上传一下哈~ 丹丹是老手不可能建错工程,可windef.h好像是win32项目哦 是不是库文件的位置错了?
设置:Tools->Options->VC++ Directories 小甲鱼 发表于 2014-7-19 22:21
是不是库文件的位置错了?
设置:Tools->Options->VC++ Directories
不好意思写错了不是stdio.h是windows.h
位置应该没错 拈花小仙 发表于 2014-7-19 22:19
丹丹是老手不可能建错工程,可windef.h好像是win32项目哦
不好意思写错了不是stdio.h是windows.h 牡丹花下死做鬼 发表于 2014-7-19 22:23
不好意思写错了不是stdio.h是windows.h
把工程中的数据库文件删了,上传一份哈,我试试 拈花小仙 发表于 2014-7-19 22:24
把工程中的数据库文件删了,上传一份哈,我试试
诶 是vc++6.0的问题换台电脑就好了但是我想知道这到底怎么回事 牡丹花下死做鬼 发表于 2014-7-19 22:33
诶 是vc++6.0的问题换台电脑就好了但是我想知道这到底怎么回事
可能像老师说的,头文件的目录设置会不会有误,找不到这些头文件位置了呢,但你平时不会去没事设这些吧 还有个问题就是不同编译器生成的,VC6生成的项目,有时即使改正了Unicode码,在VS2010中也很难转换 有文件,貌似没引用进来~奇怪.关注 。。。我小白诶 。。。我小白诶
页:
[1]