Compile error

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
highwing
Posts: 1
Joined: Thu 02 Aug 2018 01:16

Compile error

Post by highwing » Thu 02 Aug 2018 01:20

Hi all-
Just installed SDAC in C++ Builder 10.2.3 and trying to build to an OSX target. I keep getting a build error in System.ZLib.hpp. Just wondering if anyone else is having this problem. It's a simple form with just a MSConnection and MSQuery on it.

More Info..
[bccosx Error] System.ZLib.hpp(275): E2040 Declaration terminated incorrectly
Full parser context
Unit1.cpp(6): #include Unit1.h
Unit1.h(9): #include C:\Program Files (x86)\Devart\SDAC for RAD Studio 10.2\Include\OSX32\DBAccess.hpp
DBAccess.hpp(32): #include C:\Program Files (x86)\Devart\SDAC for RAD Studio 10.2\Include\OSX32\MemData.hpp
MemData.hpp(30): #include C:\Program Files (x86)\Devart\SDAC for RAD Studio 10.2\Include\OSX32\MemUtils.hpp
MemUtils.hpp(20): #include c:\program files (x86)\embarcadero\studio\19.0\include\osx\rtl\System.ZLib.hpp
System.ZLib.hpp(23): namespace System
System.ZLib.hpp(25): namespace Zlib

And this is the line that is failing

Code: Select all

//-- var, const, procedure ---------------------------------------------------
#define libzlib u"/usr/lib/libz.dylib"
static const System::WideChar _PU = (System::WideChar)(0x5f);    <--- THIS ONE
extern DELPHI_PACKAGE char *ZLIB_VERSION;
Image here: https://www.dropbox.com/s/f4s82o1buzvhc ... rIssue.png

Thoughts?
Thank you!

Stellar
Devart Team
Posts: 496
Joined: Tue 03 Oct 2017 11:00

Re: Compile error

Post by Stellar » Tue 07 Aug 2018 08:07

This problem occurs due to incorrect usage of the zlib library by С++ Builder. Unfortunately, we cannot influence it. We posted this bug to Embarcadero Quality Central here: qc.embarcadero.com/wc/qcmain.aspx?d=102742 .
As a workaround, try unchecking the options
[Packages] -> "Link with runtime packages"
and
[C++ Linker] -> "Link with dynamic RTL" .
Also, rem the line in the System.ZLib.hpp unit:
static const System::WideChar _PU = (System::WideChar)(0x5f);

You can check this by creating an empty project and adding a link to ZLib, for this, add the dependency #include "System.ZLib.hpp" to the Unit1.h module. And compile a project for Mac OS X.

Post Reply