C++ Builder XE3 – Declaration terminated incorrectly System.ZLib.hpp

Using Fast-Reports Enterprise edition, just dropping an frxReportServer component on a blank form and compiling, the XE3 compiler chokes with the following:

Error System.ZLib.hpp E2040 Declaration terminated incorrectly – on a line that says extern DELPHI_PACKAGE char *ZLIB_VERSION;

The include file train goes:

frxServer.hpp => frxServerSessionManager.hpp => frxServerReports.hpp => frxExportODF.hpp => frxZip.hpp => System.ZLib.hpp

The solution is simply to include the System.ZLib.hpp BEFORE the frxServer.hpp .  Since the latter is added to the .h file automatically, just put:

#include “System.Zlib.hpp”

first, and the program complies, links, and runs.