shlobj.h编译出错的解决方法!

原创 2004年09月12日 15:07:00

 

 

Be sure to include the following header in the COM object header file:

#include <shlobj.h>

Now you find out if you need to makes some changes before continuing. Hit build and you may likely be greeted with some error messages.

> [C++ Error] shlobj.h(1762): E2238 Multiple declaration for 
> [C++ Error] shlobj.h(1936): E2238 Multiple declaration for 
> [C++ Error] shlobj.h(3717): E2238 Multiple declaration for 
> [C++ Error] shlobj.h(4808): E2238 Multiple declaration for 

This problem is addressed in the upd1rdme.txt file in the builder directory, which appears after applying the service pack. For what it's worth, I have never tried the solution suggested in the upd1rdme.txt file. I simply commented the areas out of the ShlObj.hpp. Later I would read a post by Alex Bakaev [Team B] in borland.public.cppbuilder.activex that suggested commenting out the offending parts from the ShlObj.hpp file also. So there you have it. Someone in the know also suggests the "comment it out" solution. Great minds think alike, and all that.

The following code was all that I commented out of ShlObj.hpp to get the project to build.

...

...

As I said, I commented the areas out of the ShlObj.hpp file. You can do the same, or you can try the solution in the upd1rdme.txt file. I know at least one of them works for sure.

After you have made the changes the project should now build. Of course , it does nothing of any use to us yet. But building the project is always an accomplishment in C++, so you might as well celebrate this small victory.

 

另:shobjidl.h也出过错,我用安装文件中的同名文件替换当前文件.解决了.怀疑是之前改动过了.

SHGetPathFromIDList函数

      SHGetPathFromIDList   功能是把项目标志符列表转换为文档系统路径:   BOOL SHGetPathFromIDList(   LPCITEMIDLIST pidl, ...
  • jjchao
  • jjchao
  • 2011-06-13 17:34:00
  • 6223

vc6.0下函数SHGetFolderPath找不到

原因:C6确实编译不了这个,需要一个头文件shlobj.h(MSDN说是shfolder.h),这个头文件VC6里的陈旧了,需要下载新的MICROSOFT SDK包,用那里边的头文件替换掉VC6的。 ...
  • dongpanshan
  • dongpanshan
  • 2014-08-26 18:10:19
  • 1908

一些编译错误及解决方法<记录>

初学C++编程时,总会遇到这样那样的错误。因此,总结一些经常遇到的编译错误及解决方法,方便自己和他人,不定期更新中~ 错误1:cannot declare member function ‘stati...
  • u010425361
  • u010425361
  • 2016-09-19 10:44:45
  • 860

常见编译/链接错误及其解决办法

转载地址:http://blog.csdn.net/cc198877/article/details/8057524 这个有几个解决错误的方法比较有用。 1. 解决error LNK200...
  • lijun5635
  • lijun5635
  • 2016-03-26 17:04:38
  • 4913

常见gcc编译问题解决方法集

除非明确说明,本文内容仅针对x86/x86_64的Linux开发环境,有朋友说baidu不到,开个贴记录一下(加粗字体是关键词): 用“-Wl,-Bstatic”指定链接静态库,使用“-Wl,-Bd...
  • Aquester
  • Aquester
  • 2015-08-28 10:08:18
  • 6047

shlobj.h编译出错的解决方法!

  Be sure to include the following header in the COM object header file:#include Now you find out if...
  • vvvvvvvvvvvvvvvvvvvv
  • vvvvvvvvvvvvvvvvvvvv
  • 2004-09-12 15:07:00
  • 4635

Include文件易犯编译错误

项目中编译总是报include文件编译错误,ru
  • wuruixn
  • wuruixn
  • 2014-09-19 17:55:57
  • 1129

uboot编译出错解决方法

scripts/Makefile.build:64: /home/hw/u-boot-2014.04/board/samsung/TQ2440/Makefile: No such file or di...
  • HFB124
  • HFB124
  • 2015-06-26 08:35:54
  • 275

VS2008 fstream 编译出错的解决方法

今天在学习detours的使用,在编译一个程序时提示了错误! 1>—— 已启动生成: 项目: Detours_test, 配置: Release Win32 —— 1>正在编译… 1>...
  • HiZhanYue
  • HiZhanYue
  • 2015-08-07 17:24:33
  • 613

BCB 包含头文件报错

在include 最前面插入#define NO_WIN32_LEAN_AND_MEAN #include shlobj.h> 两行
  • stiwin
  • stiwin
  • 2004-10-06 10:44:00
  • 906
收藏助手
不良信息举报
您举报文章:shlobj.h编译出错的解决方法!
举报原因:
原因补充:

(最多只允许输入30个字)