Office2k problem.


2005-07-25 11:14:26 PM
cppbuilder21
As soon as I added TWordApplication to the form I can no longer
compile the program. I'm receiving the following error:
[C++ Error] SyncObjs.hpp(75): E2015 Ambiguity between 'Windows' and
'Word_2k::Windows'
Full parser context
Unit2.cpp(7): #include C:\Article Browser\Unit2.h
Unit2.h(19): #include C:\Program Files\Borland\CBuilder6\Indy
9\C6\IdComponent.hpp
IdComponent.hpp(15): #include C:\Program Files\Borland\CBuilder6\Indy
9\C6\IdStack.hpp
IdStack.hpp(13): #include C:\Program Files\Borland\CBuilder6\Indy
9\C6\IdGlobal.hpp
IdGlobal.hpp(14): #include c:\program
files\borland\cbuilder6\include\vcl\SyncObjs.hpp
SyncObjs.hpp(23): namespace Syncobjs
SyncObjs.hpp(70): class TEvent
I searched the newsgroup archives and it said to move the "Word_2k_srvr.h"
to the end of the includes in Unit1.h
which I did..here is my Unit1.H
#ifndef Unit1H
#define Unit1H
#include <Classes.hpp>
#include <ComCtrls.hpp>
#include <Controls.hpp>
#include <Dialogs.hpp>
#include <ExtCtrls.hpp>
#include <jpeg.hpp>
#include <Menus.hpp>
#include <msxmldom.hpp>
#include <OleCtrls.hpp>
#include <OleServer.hpp>
#include <StdCtrls.hpp>
#include <XMLDoc.hpp>
#include <xmldom.hpp>
#include <XMLIntf.hpp>
#include "SHDocVw_OCX.h"
#include "Word_2K_SRVR.h"
Here is my Unit1.cpp includes;
#define NO_WIN32_LEAN_AND_MEAN
#include <shlobj.h>
#include <intshcut.h>
#include <vcl.h>
#pragma hdrstop
#include "Article_Miner_Common.h"
// This header file
#include "Unit1.h"
#include <string>
#include <Math.hpp>
#include <Registry.hpp>
// Header file for Update Window
#include "Unit2.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
Article_Miner_Common.h contains the following:
#include <string>
#include <vcl.h>
#include <IdFTP.hpp>
Unit2's CPP
//---------------------------------------------------------------------
#include <vcl.h>
#include <registry.hpp>
#pragma hdrstop
#include "Unit2.h"
#include "Article_Miner_Common.h"
#include "/zlib/zlibengn.h"
#include "Unit1.h"
Unit2's H
#include <Classes.hpp>
#include <ComCtrls.hpp>
#include <Controls.hpp>
#include <IdBaseComponent.hpp>
#include <IdComponent.hpp>
#include <IdFTP.hpp>
#include <IdTCPClient.hpp>
#include <IdTCPConnection.hpp>
#include <StdCtrls.hpp>
I've tried just putting #include "Unit1.h" in just about every position in
every file I can think of with no luck.
Thanks,
Tom