odac 6.90.0.54 bcb 2009 -> trouble with includes
Posted: Fri 04 Dec 2009 13:05
Dear all,
I had many projects compiling without any trouble using odac 6.90.0.53.
After upgrading oracle to 6.90.0.54 ind installing dbmonitor 3 (no db monitor before), most projects refuse to compile because of:
error ws2def.h(208): E2238 Multiple declaration for sockaddr
...
Here is a sample dm.cpp:
What is strange: Adding a
just after solves the problem.
What is strange: Adding a just after does NOT solve the problem.
the dm.h only holds
It even seems that adding as last include of any form holding odac components causes an error (and added as first include causes no error).
So it seems has to be included manually at the top of each module... and it worked fine before (!).
Do you have a better solution?
Regards,
Alain
I had many projects compiling without any trouble using odac 6.90.0.53.
After upgrading oracle to 6.90.0.54 ind installing dbmonitor 3 (no db monitor before), most projects refuse to compile because of:
error ws2def.h(208): E2238 Multiple declaration for sockaddr
...
Here is a sample dm.cpp:
Code: Select all
#include
#pragma hdrstop
#include "DM.h"
#include "GDB.h"
//-----------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "DBAccess"
#pragma link "MemDS"
#pragma link "Ora"
#pragma link "OraSmart"
#pragma link "OraAlerter"
#pragma link "DAAlerter"
#pragma resource "*.dfm"
TFDM *FDM;
//---------------------------------------------------------------------------
__fastcall TFDM::TFDM(TComponent* Owner)
: TDataModule(Owner)
....
Code: Select all
#include Code: Select all
#pragma hdrstopWhat is strange: Adding a
Code: Select all
#include Code: Select all
#include "DM.h" the dm.h only holds
Code: Select all
//---------------------------------------------------------------------------
#ifndef DMH
#define DMH
//---------------------------------------------------------------------------
#include
#include
#include
#include
#include
#include
#include "DBAccess.hpp"
#include "MemDS.hpp"
#include "Ora.hpp"
#include "OdacVcl.hpp"
#include "OraSmart.hpp"
#include "OraAlerter.hpp"
#include "DAAlerter.hpp"
//---------------------------------------------------------------------------
class TFDM : public TDataModule
{
__published: // IDE-managed Components
TOraQuery *QProductDDLB;
TDataSource *DSProductDDLB;
TOraQuery *QLanguageDDLB;
TDataSource *DSLanguageDDLB;
TOraQuery *QCardsSitesDDLB;
TDataSource *DSCardsSites;
TOraQuery *QUserDDLB;
TDataSource *DSUserDDLB;
TDataSource *DSReasons;
TOraQuery *QReasonsDDLB;
TOraQuery *QOwnerDDLB;
TDataSource *DSOwnerDDLB;
TOraQuery *QNatureDDLB;
TDataSource *DSNatureDDLB;
TOraQuery *QCategoryDDLB;
TDataSource *DSCategoryDDLB;
TOraQuery *QTrackTypeDDLB;
TDataSource *DSTrackTypeDDLB;
TOraQuery *QCardTypeDDLB;
TDataSource *DSCardTypeDDLB;
TOraQuery *QProductTypeDDLB;
TDataSource *DSProductTypeDDLB;
TOraQuery *QChipTypeDDLB;
TDataSource *DSChipTypeDDLB;
TOraQuery *QMarketingTypeDDLB;
TDataSource *DSMarketingTypes;
TOraQuery *QCurrencyDDLB;
TDataSource *DSCurrencyDDLB;
TOraQuery *QProjectDDLB;
TDataSource *DSProjectDDLB;
TDataSource *DSSiteRefDDLB;
TOraQuery *QSiteRefDDLB;
TOraQuery *QProductDDLBR;
TDataSource *DSProductDDLBR;
TOraQuery *QClientDDLB;
TDataSource *DSClientDDLB;
TOraQuery *QPeople;
TOraSession *OurDB;
TConnectDialog *ConnectDialog1;
TOraQuery *QASProjects;
TOraQuery *QASProjectsStages;
TOraQuery *QAsProjectsWithEmpty;
TOraQuery *QLibelles;
TOraQuery *QAddBatchGroup;
TOraQuery *UpdateBatchGroupState;
TOraQuery *UpdateBatchGroupCounts;
TOraQuery *GetBatchGroupCounts;
TOraQuery *OraKillMessage;
TOraQuery *OraSetMessageStatus;
TOraQuery *QGetStageIDFromNameAndWay;
TOraQuery *QLog;
TSmartQuery *SMQuery;
TOraAlerter *OraAlerter1;
TOraQuery *UpdateBatchGroupStateAndCount;
TOraQuery *QUpdMachineCount;
TOraQuery *QMachineLog;
TOraQuery *QShift;
TOraQuery *QLastShift;
TOraQuery *QLogSetReady;
TOraQuery *QDepanInfo;
TFloatField *QDepanInfoID;
TStringField *QDepanInfoMACHINEID;
TDateTimeField *QDepanInfoDTBEGIN;
TStringField *QDepanInfoOPEASKER;
TStringField *QDepanInfoOPESERVER;
TStringField *QDepanInfoTYPE;
TStringField *QDepanInfoTROUBLESTATUS;
TDateTimeField *QDepanInfoDTSOLVED;
TFloatField *QDepanInfoPRIORITY;
TFloatField *QDepanInfoTIMEPRESTEDHOURS;
TStringField *QDepanInfoSYNOPSIS;
TFloatField *QDepanInfoTHREADID;
TOraQuery *QLibelles2;
TOraQuery *QDepartmentsDDLB;
TFloatField *QDepanInfoRESPONDINGDEPARTMENT;
TFloatField *QDepanInfoASKINGDEPARTMENT;
TOraQuery *QMachineHistory;
TOraQuery *QInsPlannedStopAsked;
TOraQuery *QInsEntretienMachine;
TOraQuery *QSetAllowID;
TOraQuery *QRefusePlannedStop;
TOraQuery *QProductSetLastUse;
TOraStoredProc *SPStockInfo;
TOraQuery *QGetEMailFromTrigram;
TOraQuery *QQualCheckNeeded;
TOraQuery *QAddThreadProp;
TOraQuery *QTotProdExcel;
TOraQuery *QUnplannedTroublesMonitor;
TOraQuery *QSMUQTDest;
TOraQuery *QSMUQTOrig;
TOraQuery *QSMQTM;
TOraQuery *QSMDM;
TOraQuery *QReadSM;
TOraQuery *QSMVUQT;
TOraQuery *QSMSTQTI;
TOraQuery *QGetMoulRefs;
TStringField *QGetMoulRefsREF;
TDateTimeField *QDepanInfoDTSTARTWORK;
TStringField *QDepanInfoGARDE;
TFloatField *QDepanInfoCATDEP;
TFloatField *QDepanInfoSUBCATDEP;
TOraQuery *QINSBatchGroup;
TOraQuery *QINSBatchGroup2;
TOraQuery *QGetGroupHold;
TOraQuery *QInsSerials;
TOraQuery *QSerBooks;
TOraQuery *QUnplannedTroubleInsert;
TOraQuery *QgroupMaySetReady;
TOraQuery *QGetEidOutReasons;
TOraQuery *QThreadToRead;
TOraQuery *QRThreadToRead;
void __fastcall OurDBError(TObject *Sender, EDAError *E, bool &Fail);
void __fastcall OurDBBeforeDisconnect(TObject *Sender);
void __fastcall OraAlerter1TimeOut(TObject *Sender, bool &Continue);
void __fastcall OurDBConnectionLost(TObject *Sender, TComponent *Component, TConnLostCause ConnLostCause,
TRetryMode &RetryMode);
private: // User declarations
public: // User declarations
bool bBatchMode;
__fastcall TFDM(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TFDM *FDM;
//---------------------------------------------------------------------------
#endifCode: Select all
#include So it seems has to be included manually at the top of each module... and it worked fine before (!).
Do you have a better solution?
Regards,
Alain