fabriciocolombo / delphi-rest-client-api

A Delphi REST client API to consume REST services written in any programming language.
Apache License 2.0
380 stars 182 forks source link

Compilation error in Delphi XE: Undeclared identifier AsInt64 #17

Closed vegar closed 10 years ago

vegar commented 10 years ago

When trying to compile the DelphiXE_RestAPI package, I get the following errors:

[DCC Error] DBXJsonUnMarshal.pas(167): E2003 Undeclared identifier: 'AsInt64'
[DCC Error] DBXJsonUnMarshal.pas(177): E2003 Undeclared identifier: 'AsInt64'
[DCC Error] DBXJsonUnMarshal.pas(263): E2003 Undeclared identifier: 'AsInt64'
[DCC Fatal Error] F2063 Could not compile used unit 'DBXJsonUnMarshal.pas'

The AsInt64 method is defined in the TJsonNumberHelper class in DBXJsonHelpers.pas, but conditionally included just for delphi 2010.

Is this an error, or should the package compile without this helper?

thatalextaylor commented 10 years ago

I think it's only wrapped in the IFDEF because of the DBXJson stuff (rather than class helpers). What I don't understand is what would happen pre-2010. Surely the calling code would need to be wrapped in similar IFDEFs.