求 Ambiguity between 'Windows' and 'Excel_2k::Windows' 的解决方法
编译的时候出现一堆的错误:
[C++ Error] olectrls.hpp(107): E2015 Ambiguity between 'Windows' and 'Word_2k::Windows'
[C++ Error] SyncObjs.hpp(75): E2015 Ambiguity between 'Windows' and 'Excel_2k::Windows'
[C++ Error] ExtDlgs.hpp(32): E2015 Ambiguity between 'Dialogs' and 'Excel_2k::Dialogs'
[C++ Error] ExtDlgs.hpp(34): E2015 Ambiguity between 'Dialogs' and 'Excel_2k::Dialogs'
[C++ Error] ExtDlgs.hpp(39): E2015 Ambiguity between 'Buttons' and 'Excel_2k::Buttons'
[C++ Error] sbs.cpp(78): E2277 Lvalue required
.......
sbs.cpp包含头文件如下:
----------------------------------
#include <vcl.h>
#pragma hdrstop
#include "share.h"
#include "sbs.h"
#pragma package(smart_init)
#pragma link "Excel_2K_SRVR"
#pragma resource "*.dfm"
......
---------------------------------
sbs.h包含头文件如下:
----------------------------------
#ifndef B_sbsjcxH
#define B_sbsjcxH
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Buttons.hpp>
#include <Grids.hpp>
#include <Dialogs.hpp>
#include <OleServer.hpp>
#include <ComCtrls.hpp>
#include <ExtCtrls.hpp>
#include "Excel_2K_SRVR.h"
-----------------------------------
share.h 包含头文件如下
-----------------------------------
#ifndef B_shareH
#define B_shareH
#include <SysUtils.hpp>
#include <Grids.hpp>
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <DBGrids.hpp>
#include <Dialogs.hpp>
#include <OleServer.hpp>
#include <Chart.hpp>
#include <utilcls.h>
#include <Word_2k.h>
#include <Word_2K_SRVR.h>
#include <Excel_2K_SRVR.h>
------------------------------------
调整#include "Excel_2K_SRVR.h"的位置的确有效果,但是现在sbs.cpp中同时包含了
share.h 和 sbs.h ,而share.h 和 sbs.h 中又都包含有Excel_2K_SRVR.h ,调顺序已经没有用了!!
哪位有办法解决,分全给!!今晚在线等!