K
Kris
Hi All,
I am having a problem compiling a C++ project that I am working on and I'm
hoping that one of you C++ gurus out there can provide me with some
guidance.
I have tried a number of things to correct the problem but have had no
success so far. I'm pretty sure that the problem is related to the fact that
two of the header files in the project are trying to include the same dll
file (msado15.dll).
I have provided the details for the error and the relevant code snippets
below. If anyone out there can provide some assistance, it would be greatly
appreciated.
The Error
===================
error C2871: 'ADOCG' : a namespace with this name does not exist
ADODatabase.h
===================
#import "C:\Program Files\Common Files\System\ADO\msado15.dll" \
rename("EOF", "EndOfFile")
#import "C:\Program Files\Common Files\System\ado\MSJRO.DLL" \
no_namespace
using namespace ADODB;
myCStudyRecordSet.h
===================
#import "C:\Program Files\Common Files\System\ADO\msado15.dll" \
rename_namespace("ADOCG") rename("EOF", "EndOfFile")
using namespace ADOCG;
Order of The Includes
===================
#include "ADODatabase.h"
#include "myCStudyRecordSet.h"
Thanks In Advance,
Kris
I am having a problem compiling a C++ project that I am working on and I'm
hoping that one of you C++ gurus out there can provide me with some
guidance.
I have tried a number of things to correct the problem but have had no
success so far. I'm pretty sure that the problem is related to the fact that
two of the header files in the project are trying to include the same dll
file (msado15.dll).
I have provided the details for the error and the relevant code snippets
below. If anyone out there can provide some assistance, it would be greatly
appreciated.
The Error
===================
error C2871: 'ADOCG' : a namespace with this name does not exist
ADODatabase.h
===================
#import "C:\Program Files\Common Files\System\ADO\msado15.dll" \
rename("EOF", "EndOfFile")
#import "C:\Program Files\Common Files\System\ado\MSJRO.DLL" \
no_namespace
using namespace ADODB;
myCStudyRecordSet.h
===================
#import "C:\Program Files\Common Files\System\ADO\msado15.dll" \
rename_namespace("ADOCG") rename("EOF", "EndOfFile")
using namespace ADOCG;
Order of The Includes
===================
#include "ADODatabase.h"
#include "myCStudyRecordSet.h"
Thanks In Advance,
Kris