Hi, thanks for the advice - and apologies! The
TAccountsDB* tAccountsDB;
line is in "main.cpp". However, there is a
extern TAccountsDB* tAccountsDB;
line within "main.h", quite a way through.
Also, apologies for not posting the code - it had approx. ~150 includes, etc, which I thought would be overkill to post before I reached the line in the .cpp, which I didn't feel were helpful.
To answer, the existing problem question: it's complicated. It's an existing problem, but the staff who developed this before me have left, and also have left little in the way of documentation... so take that as you will. But, these issues aren't from anything I have changed. In it's current state, I can't even run it to debug it - it's also rather substantial.
I do get other warnings before the errors
[C++ Warning] TYearEndOprType.cpp(3): W8058 Cannot create pre-compiled header: write failed |
however I didn't think this would be much of an issue as of the moment. This happens for all .cpp files that it's gone through up to the issue.
I did notice something - the TYearEndOprType.cpp file does not have a header file; however it does have in "DataAccess.h":
1 2 3 4 5 6 7 8 9
|
class PACKAGE TTYearEndOprType : public TTable
{
private:
protected:
public:
__fastcall TTYearEndOprType(TComponent* Owner);
__fastcall TTYearEndOprType(TComponent* Owner, TDataSource* objDS);
__published:
};
|
which I believe should be valid. "Main.h" includes "User.h", and "User.h" includes "DataAccess.h"; so in a way I believe this should be acceptable.
EDIT: I think I've managed to fix this issue, for whatever reason it was looking at the wrong "main.h" file... well, onto the next error now! A multiple declaration issue, if you must know. Wish me luck.