请问在VC6.0中如何调用其他库文件,谢谢!

rockally 2005-08-01 04:36:10
我用VC6.0的setupapi.h和setupapi.lib的时候,用了一个结构:SP_DRVINFO_DATA,其中只有6个参数,而我需要8个参数,MSDN也说DDK中这个结构有8个参数,所以我下载了一个DDK开发包,里面的setupapi.h的SP_DRVINFO_DATA结构有8个参数,我希望在VC6.0中利用DDK中的setupapi.h和setupapi.lib,而不用自带的,应该怎么设置,谢谢!
...全文
240 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
rockally 2005-08-01
  • 打赏
  • 举报
回复
问题解决,删除Debug就可以了,给分了.谢谢大家.
rockally 2005-08-01
  • 打赏
  • 举报
回复
出现了这么多错误,不知道怎么回事?
e:\afterinstall\ntddk\inc\setupapi.h(514) : error C2146: syntax error : missing ';' before identifier 'Reserved'
e:\afterinstall\ntddk\inc\setupapi.h(514) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
e:\afterinstall\ntddk\inc\setupapi.h(514) : error C2501: 'Reserved' : missing storage-class or type specifiers
e:\afterinstall\ntddk\inc\setupapi.h(526) : error C2146: syntax error : missing ';' before identifier 'Reserved'
e:\afterinstall\ntddk\inc\setupapi.h(526) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
e:\afterinstall\ntddk\inc\setupapi.h(526) : error C2501: 'Reserved' : missing storage-class or type specifiers
e:\afterinstall\ntddk\inc\setupapi.h(667) : error C2146: syntax error : missing ';' before identifier 'ClassInstallReserved'
e:\afterinstall\ntddk\inc\setupapi.h(667) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
e:\afterinstall\ntddk\inc\setupapi.h(667) : error C2501: 'ClassInstallReserved' : missing storage-class or type specifiers
e:\afterinstall\ntddk\inc\setupapi.h(680) : error C2146: syntax error : missing ';' before identifier 'ClassInstallReserved'
e:\afterinstall\ntddk\inc\setupapi.h(680) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
e:\afterinstall\ntddk\inc\setupapi.h(680) : error C2501: 'ClassInstallReserved' : missing storage-class or type specifiers
e:\afterinstall\ntddk\inc\setupapi.h(1185) : error C2146: syntax error : missing ';' before identifier 'Reserved'
e:\afterinstall\ntddk\inc\setupapi.h(1185) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
e:\afterinstall\ntddk\inc\setupapi.h(1185) : error C2501: 'Reserved' : missing storage-class or type specifiers
e:\afterinstall\ntddk\inc\setupapi.h(1196) : error C2146: syntax error : missing ';' before identifier 'Reserved'
e:\afterinstall\ntddk\inc\setupapi.h(1196) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
e:\afterinstall\ntddk\inc\setupapi.h(1196) : error C2501: 'Reserved' : missing storage-class or type specifiers
e:\afterinstall\ntddk\inc\setupapi.h(1211) : error C2146: syntax error : missing ';' before identifier 'Reserved'
e:\afterinstall\ntddk\inc\setupapi.h(1211) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
e:\afterinstall\ntddk\inc\setupapi.h(1211) : error C2501: 'Reserved' : missing storage-class or type specifiers
e:\afterinstall\ntddk\inc\setupapi.h(1220) : error C2146: syntax error : missing ';' before identifier 'Reserved'
e:\afterinstall\ntddk\inc\setupapi.h(1220) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
e:\afterinstall\ntddk\inc\setupapi.h(1220) : error C2501: 'Reserved' : missing storage-class or type specifiers
e:\afterinstall\ntddk\inc\setupapi.h(1267) : error C2146: syntax error : missing ';' before identifier 'Reserved'
e:\afterinstall\ntddk\inc\setupapi.h(1267) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
e:\afterinstall\ntddk\inc\setupapi.h(1267) : error C2501: 'Reserved' : missing storage-class or type specifiers
e:\afterinstall\ntddk\inc\setupapi.h(1279) : error C2146: syntax error : missing ';' before identifier 'Reserved'
e:\afterinstall\ntddk\inc\setupapi.h(1279) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
e:\afterinstall\ntddk\inc\setupapi.h(1279) : error C2501: 'Reserved' : missing storage-class or type specifiers
e:\afterinstall\ntddk\inc\setupapi.h(1303) : error C2146: syntax error : missing ';' before identifier 'PrivateData'
e:\afterinstall\ntddk\inc\setupapi.h(1303) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
e:\afterinstall\ntddk\inc\setupapi.h(1303) : error C2501: 'PrivateData' : missing storage-class or type specifiers
e:\afterinstall\ntddk\inc\setupapi.h(1361) : error C2146: syntax error : missing ';' before identifier 'Reserved'
e:\afterinstall\ntddk\inc\setupapi.h(1361) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
e:\afterinstall\ntddk\inc\setupapi.h(1361) : error C2501: 'Reserved' : missing storage-class or type specifiers
e:\afterinstall\ntddk\inc\cfgmgr32.h(122) : error C2146: syntax error : missing ';' before identifier 'LOG_CONF'
e:\afterinstall\ntddk\inc\cfgmgr32.h(122) : fatal error C1004: unexpected end of file found
Error executing cl.exe.
Creating browse info file...
BSCMAKE: error BK1506 : cannot open file '.\Debug\Page1.sbr': No such file or directory
Error executing bscmake.exe.

driver.exe - 39 error(s), 0 warning(s)
rockally 2005-08-01
  • 打赏
  • 举报
回复
这点我也看了,我的就是Win2000以上的操作系统,加了前面两个目录include files,lib,还是不行,不过还是谢谢你.
handsomerun 2005-08-01
  • 打赏
  • 举报
回复
呵呵,说实话,我没装过ddk,单位装的是sdk,也是这么设置的
至于src么,我也忘记了要不要设置了,好像不是必须的吧,我忘记了 :(

看了看msdn,
下面有这么句话,不知道对你有没有帮助

In SetupAPI.h, this structure equates to either SP_DRVINFO_DATA_V1 or SP_DRVINFO_DATA_V2, based on whether you include the following line in your source code:

#define USE_SP_DRVINFO_DATA_V1 1

Define this identifier if your component must run on Windows 98/Me, or on NT-based OS versions earlier than Windows 2000. If your component will be used only on Windows 2000 and later, do not define the identifier. If the identifier is not defined, SP_DRVINFO_DATA_V2 is used.

SP_DRVINFO_DATA_V1 does not contain DriverDate and DriverVersion members.



和操作系统有关系??
rockally 2005-08-01
  • 打赏
  • 举报
回复
非常感谢,但是我的DDK找到了目录include files,lib,但是没有看到src的目录啊,好象没有,SP_DRVINFO_DATA还是6个参数,请大家再次帮忙,非常感谢!我的DDK在这里下载的:http://www.vckbase.com/tools/listtools.asp?tclsid=103,请大家帮忙.
handsomerun 2005-08-01
  • 打赏
  • 举报
回复
呵呵,看到我不好吗
:)
saliors 2005-08-01
  • 打赏
  • 举报
回复
楼上的,哪里都能见到你啊~
handsomerun 2005-08-01
  • 打赏
  • 举报
回复
楼上的正解
tools->options->directions,
然后把include files,lib,和src下添加你安装的ddk路径,移到最上面
saliors 2005-08-01
  • 打赏
  • 举报
回复
也可以在VC的编译环境里面把DDK的INCLUDE目录加上,并把它移到最前面,这样VC编译的时候会优先用DDK里面的头文件。
dirdirdir3 2005-08-01
  • 打赏
  • 举报
回复
你的include的时候把路径加上去就是了。

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧