I am trying to add database functionality to one of my existing applications. When I added the TMyConnection to one of my forms and tried to compile, I get the following errors:
[C++ Error] Zlib.hpp(277): E2189 extern variable cannot be initialized
[C++ Error] Zlib.hpp(277): E2108 Improper use of typedef 'TZStreamRec'
[C++ Error] Zlib.hpp(277): E2451 Undefined symbol 'strm'
[C++ Error] Zlib.hpp(277): E2293 ) expected
[C++ Error] Zlib.hpp(282): E2189 extern variable cannot be initialized
[C++ Error] Zlib.hpp(282): E2108 Improper use of typedef 'TZStreamRec'
[C++ Error] Zlib.hpp(282): E2293 ) expected
[C++ Error] Crxml.hpp(202): E2040 Declaration terminated incorrectly
I had no problem getting the MyDAC components to work in a new application.
I am using BDS version:
Borland® Developer Studio for Microsoft® Windows™ Version 10.0.2166.28377 Update 1 Copyright © 2005 Borland® Software Corporation. All Rights Reserved.
Win2K version:
build 2195, SP4
MyDAC version:
5.0
Any suggestions? I have to get this working to purchase.
BDS App won't compile when I added TMyConnection
The problem is actually being caused by the use of the ostream function "flush" in the declaration of the deflate and inflate functions defined in ZLib.hpp:
extern PACKAGE int __fastcall inflate(TZStreamRec &strm, int flush);
extern PACKAGE int __fastcall deflate(TZStreamRec &strm, int flush);
I don't understand why 'flush' would refer to the ostream function here, since the entire ZLip.hpp file is enclosed in a namespace block.
The second problem is the use of EOF (defined in stdio.h I think) in the file CRXml.hpp line 202:
__property bool EOF = {read=FEof, nodefault};
This file is also enclosed in a namespace. Can anyone explain what is going on here and how to fix it?
Thanks!
extern PACKAGE int __fastcall inflate(TZStreamRec &strm, int flush);
extern PACKAGE int __fastcall deflate(TZStreamRec &strm, int flush);
I don't understand why 'flush' would refer to the ostream function here, since the entire ZLip.hpp file is enclosed in a namespace block.
The second problem is the use of EOF (defined in stdio.h I think) in the file CRXml.hpp line 202:
__property bool EOF = {read=FEof, nodefault};
This file is also enclosed in a namespace. Can anyone explain what is going on here and how to fix it?
Thanks!