阅读:1279回复:1
用VC++编译不出来?
本人安装了VTOOLS 95,而且用它快速生成了三个文件.分别是.MAK,CPP,H文件,
使用的是VC 6.0编译.我的参考书为<<虚拟设备驱动程序开发起步与进阶>> ,书上说可以使用集成方式编译,步骤如下: (1)启动VC 6.0 (2)从FILE菜单选择open workspace项. (3)选择由VTOOLS生成的.MAK文件,此时会出现一个消息对话框,说明.MAK文件是 个外部文件,按YES即可. (4)重新命名.MAK文件 (5)在mdp Insert菜单中选择\"File into project\",选择所有源文件,但不包括 .H文件. (6)在mdp Buile菜单中选择Settings,从General tab中,设置要生成的VXD名. (7)编译并生成VXD 我的实际操作如下: (1)(2)(3)(4)(5)(6)(7)步的设置中没出任何问题,但是在(7)中,发现编译出错.显示错误信息为: --------------------Configuration: W32IO - Win32 Debug-------------------- Compiling... W32IO.cpp c:\\program files\\numega\\vtoolsd\\bin\\w32io.h(10) : error C2010: \'1\' : unexpected in macro formal parameter list c:\\program files\\numega\\vtoolsd\\bin\\w32io.h(10) : error C2010: \',\' : unexpected in macro formal parameter list c:\\program files\\numega\\vtoolsd\\bin\\w32io.h(15) : error C2061: syntax error : identifier \'PIOCTLPARAMS\' c:\\program files\\numega\\vtoolsd\\bin\\w32io.h(25) : error C2504: \'VThread\' : base class undefined c:\\program files\\numega\\vtoolsd\\bin\\w32io.cpp(5) : error C2065: \'W32IO\' : undeclared identifier c:\\program files\\numega\\vtoolsd\\bin\\w32io.cpp(8) : error C2501: \'Declare_Virtual_Device\' : missing storage-class or type specifiers c:\\program files\\numega\\vtoolsd\\bin\\w32io.cpp(8) : error C2143: syntax error : missing \';\' before \'tag::id\' c:\\program files\\numega\\vtoolsd\\bin\\w32io.cpp(10) : error C2614: \'W32ioThread\' : illegal member initialization: \'VThread\' is not a base or member c:\\program files\\numega\\vtoolsd\\bin\\w32io.cpp(11) : error C2065: \'PIOCTLPARAMS\' : undeclared identifier c:\\program files\\numega\\vtoolsd\\bin\\w32io.cpp(11) : error C2146: syntax error : missing \')\' before identifier \'p\' c:\\program files\\numega\\vtoolsd\\bin\\w32io.cpp(11) : error C2350: \'W32ioDevice::OnW32DeviceIoControl\' is not a static member c:\\program files\\numega\\vtoolsd\\bin\\w32io.cpp(11) : error C2059: syntax error : \')\' c:\\program files\\numega\\vtoolsd\\bin\\w32io.cpp(12) : error C2143: syntax error : missing \';\' before \'{\' c:\\program files\\numega\\vtoolsd\\bin\\w32io.cpp(12) : error C2447: missing function header (old-style formal list?) Error executing cl.exe. W32IO.exe - 14 error(s), 0 warning(s) 我觉得是环境设置不对,请各位大侠帮看一看,在此先谢 |
|
沙发#
发布于:2003-08-04 12:04
是不是还有头文件没加入?看你的出错好像是漏了定义。
|
|