请教VC6使用WMI的问题,VC2008能正常编译运行..

NesTa_xP 2009-06-04 11:03:36
--------------------Configuration: testWMI - Win32 Debug--------------------
Compiling...
testWMI.cpp
F:\test\testWMI\testWMI.cpp(5) : fatal error C1083: Cannot open include file: 'wbemidl.h': No such file or directory
Error executing cl.exe.

testWMI.exe - 1 error(s), 0 warning(s)

请问如何解决此问题?
其他代码完全正确,在vc08里测试过的.
...全文
318 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
peng00 2010-01-13
  • 打赏
  • 举报
回复
hhhhhhh
buaayanminmin 2009-06-26
  • 打赏
  • 举报
回复
up
NesTa_xP 2009-06-04
  • 打赏
  • 举报
回复
sdk v5.0里有这个文件,我把sdk v5.0的include lib这2个文件夹全部复制到vc的include 和lib了
但是现在链接出错.
--------------------Configuration: testWMI - Win32 Debug--------------------
Linking...
G:\Microsoft Visual Studio\VC98\LIB\wbemuuid.lib : fatal error LNK1112: module machine type "IA64" conflicts with target machine type "IX86"
Error executing link.exe.

testWMI.exe - 1 error(s), 0 warning(s)
NesTa_xP 2009-06-04
  • 打赏
  • 举报
回复
#define _WIN32_DCOM
#include <iostream>
using namespace std;
#include <comdef.h>
#include <wbemidl.h>
#pragma comment(lib, "wbemuuid.lib")

这些是头部的包含信息..
mengde007 2009-06-04
  • 打赏
  • 举报
回复
哪来的wbemuuid.lib?
lingyin55 2009-06-04
  • 打赏
  • 举报
回复
1、保证'wbemidl.h'存在
2、是否忘记设置链接lib库,可以在link设置里面设置
或者用#pragma comment(lib, "wbemuuid.lib")
delphi_911 2009-06-04
  • 打赏
  • 举报
回复
珍惜生命,远离VC6
FengRider 2009-06-04
  • 打赏
  • 举报
回复
wbemidl.h这个文件确实存在,而且路径正确?
ltc_mouse 2009-06-04
  • 打赏
  • 举报
回复
module machine type "IA64" conflicts with target machine type "IX86"
------------------------
看看这个链接有没帮助?
http://topic.csdn.net/t/20060815/11/4950393.html

65,211

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

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