其他语言

本类阅读TOP10

·基于Solaris 开发环境的整体构思
·使用AutoMake轻松生成Makefile
·BCB数据库图像保存技术
·GNU中的Makefile
·射频芯片nRF401天线设计的分析
·iframe 的自适应高度
·BCB之Socket通信
·软件企业如何实施CMM
·入门系列--OpenGL最简单的入门
·WIN95中日志钩子(JournalRecord Hook)的使用

分类导航
VC语言Delphi
VB语言ASP
PerlJava
Script数据库
其他语言游戏开发
文件格式网站制作
软件工程.NET开发
shlobj.h编译出错的解决方法!

作者:未知 来源:月光软件站 加入时间:2005-2-28 月光软件站

 

 

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 'FVSHOWINFO'
> [C++ Error] shlobj.h(1936): E2238 Multiple declaration for 'FOLDERSETTINGS'
> [C++ Error] shlobj.h(3717): E2238 Multiple declaration for 'DESKBANDINFO'
> [C++ Error] shlobj.h(4808): E2238 Multiple declaration for 'SHELLFLAGSTATE'

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.

//typedef FVSHOWINFO *PFVShowInfo;
//typedef FVSHOWINFO  TFVShowInfo;
//typedef FOLDERSETTINGS *PFolderSettings;
//typedef FOLDERSETTINGS  TFolderSettings;
...
//typedef DESKBANDINFO *PDeskBandInfo;
//typedef DESKBANDINFO  TDeskBandInfo;
...
//typedef SHELLFLAGSTATE *PShellFlagState;
//typedef SHELLFLAGSTATE  TShellFlagState;

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也出过错,我用安装文件中的同名文件替换当前文件.解决了.怀疑是之前改动过了.




相关文章

相关软件