阅读:1630回复:14
请教:Expassthru1 中test的编译问题
各位大家好,这是一个老外写的ddk2k3下的passthru的扩展,在ddk2k3下,driver编译通过了,但是test不知道是怎么回事,在vc下没有编译过去,欢迎能提供完全解决方案者。
原文:http://www.wd-3.com/archive/ExtendingPassthru.htm 分数20 ,不成敬意。 附件是从网站下的代码。 |
|
|
沙发#
发布于:2004-04-19 09:06
各位高手,难道没有人看过这个例子吗?
还是我问的问题TOO SAMPLE? 请DDK2003 、ARTHURTU、HUYUGUANG 等大侠帮个忙看看拉。 |
|
板凳#
发布于:2004-04-19 10:44
编译时的出错信息:
--------------------Configuration: PTUSERIO - Win32 Debug-------------------- Compiling... PTUSERIO.CPP Linking... nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex Debug/PTUSERIO.exe : fatal error LNK1120: 2 unresolved externals Error executing link.exe. PTUSERIO.exe - 3 error(s), 0 warning(s) |
|
地板#
发布于:2004-04-20 09:26
编译时的出错信息: 少加入了nafxcwd.lib的类库....你在VC的工程的设置里面有个LINK的选项里加入nafxcwd.lib的类库吧.....给分..... |
|
地下室#
发布于:2004-04-20 22:21
谢谢 不知道为什么成19分了 我还不怎么会用这个给分的东东
等我试试看 我相信你是正确的。 |
|
5楼#
发布于:2004-04-20 22:35
哥们 ,很抱歉的说,错误依旧,
我按照你说的在LINK里面添加了那个库 , 然后又查找了一下 在这个目录下, D:\\Program Files\\Microsoft Visual Studio\\VC98\\MFC\\Lib 日期是2000-7-15 0:00 如果有时间的话,你可以把上面的那个附件当下来,自己编译编译看看。 仍然谢谢你。 |
|
6楼#
发布于:2004-04-21 07:40
ft,没有仔细看MSDN吗?
#include <process.h> Libraries LIBCMT.LIB Multithread static library, retail version MSVCRT.LIB Import library for MSVCRT.DLL, retail version To use _beginthread or _beginthreadex, the application must link with one of the multithreaded C run-time libraries. |
|
7楼#
发布于:2004-04-21 14:17
arthurtu,
你还在线啊,真好 我按照你说的做了,加了头文件,还是原来的错误,再加LIBCMT.LIB 错误更多, 去掉LIBCMT.LIB ,加MSVCRT.LIB 有17个错误 ************************************* ************************************* Deleting intermediate files and output files for project \'PTUSERIO - Win32 Debug\'. --------------------Configuration: PTUSERIO - Win32 Debug-------------------- Compiling... PTUSERIO.CPP Linking... libcd.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRT.LIB(msvcrt.dll) libcd.lib(crt0dat.obj) : error LNK2005: __exit already defined in MSVCRT.LIB(msvcrt.dll) libcd.lib(crt0dat.obj) : error LNK2005: __cexit already defined in MSVCRT.LIB(msvcrt.dll) libcd.lib(crt0dat.obj) : error LNK2005: __c_exit already defined in MSVCRT.LIB(msvcrt.dll) libcd.lib(dbgheap.obj) : error LNK2005: _free already defined in MSVCRT.LIB(msvcrt.dll) libcd.lib(dbgheap.obj) : error LNK2005: __msize already defined in MSVCRT.LIB(msvcrt.dll) libcd.lib(dbgheap.obj) : error LNK2005: _malloc already defined in MSVCRT.LIB(msvcrt.dll) libcd.lib(dbgheap.obj) : error LNK2005: _calloc already defined in MSVCRT.LIB(msvcrt.dll) libcd.lib(dbgheap.obj) : error LNK2005: __expand already defined in MSVCRT.LIB(msvcrt.dll) libcd.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRT.LIB(cinitexe.obj) libcd.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRT.LIB(cinitexe.obj) libcd.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRT.LIB(cinitexe.obj) libcd.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRT.LIB(cinitexe.obj) libcd.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in MSVCRT.LIB(msvcrt.dll) libcd.lib(atox.obj) : error LNK2005: _atoi already defined in MSVCRT.LIB(msvcrt.dll) libcd.lib(crt0.obj) : error LNK2005: _mainCRTStartup already defined in MSVCRT.LIB(crtexe.obj) LINK : warning LNK4098: defaultlib \"libcd.lib\" conflicts with use of other libs; use /NODEFAULTLIB:library Debug/PTUSERIO.exe : fatal error LNK1169: one or more multiply defined symbols found Error executing link.exe. PTUSERIO.exe - 17 error(s), 1 warning(s) |
|
8楼#
发布于:2004-04-21 14:22
那个MSDN我是没有仔细看,我看了也看不明白:(
我要看哪个主题? arthurtu ,一定看帮我解决了这个问题啊,看到你,我就像看到了救命稻草。 [编辑 - 4/21/04 by liusz] |
|
9楼#
发布于:2004-04-21 19:07
不好意思没有仔细看,对不起。
你试试vs.net,他就是用的vs.net [编辑 - 4/21/04 by arthurtu] |
|
10楼#
发布于:2004-04-21 19:59
在就是在project->Setting->General,选Using MFC as shared DLL(或static lib),总之是用MFC
|
|
11楼#
发布于:2004-04-21 22:07
在就是在project->Setting->General,选Using MFC as shared DLL(或static lib),总之是用MFC 我用的是static lib,成功了谢谢,太谢谢了。 |
|
12楼#
发布于:2004-04-21 22:16
您好,我没有2003的ddk,所以不知如何帮您,但我现在正缺它,您能告诉我怎么得到它吗,或者您能上传吗,谢谢您!!! :)
|
|
13楼#
发布于:2004-04-22 12:47
原来有个FTP的 好象现在不可以上了
[编辑 - 4/23/04 by liusz] |
|
14楼#
发布于:2004-06-18 16:41
不知有没人用它做一些读写控制的扩展?希望有人讨论讨论!
|
|
|