You are not logged in.
Pages: 1
I built some classes (based on TWinHTTP + other) and used it in a Delphi app but would like to separate these into a Delphi package. When I do this however the exact same code (that compiles fine as an app) throws numerous errors related to mormot.
Errors as follows,
[DCC Error] SynBidirSock.pas(755): E1025 Unsupported language feature: 'Object'
[DCC Error] SynBidirSock.pas(803): E1025 Unsupported language feature: 'Object'
[DCC Error] SynBidirSock.pas(821): E1025 Unsupported language feature: 'Object'
[DCC Error] SynBidirSock.pas(847): E1025 Unsupported language feature: 'Object'
[DCC Error] SynBidirSock.pas(926): E1025 Unsupported language feature: 'Object'
[DCC Error] SynBidirSock.pas(1054): E1025 Unsupported language feature: 'Object'
[DCC Error] SynSSPI.pas(100): E1025 Unsupported language feature: 'Object'
[DCC Error] SynSSPI.pas(106): E1025 Unsupported language feature: 'Object'
[DCC Error] SynSSPI.pas(109): E1025 Unsupported language feature: 'Object'
[DCC Error] SynSSPI.pas(115): E1025 Unsupported language feature: 'Object'
[DCC Error] mORMot.pas(2388): E1025 Unsupported language feature: 'Object'
[DCC Error] mORMot.pas(2404): E1025 Unsupported language feature: 'Object'
[DCC Error] mORMot.pas(3690): E1025 Unsupported language feature: 'Object'
[DCC Error] mORMot.pas(4771): E1025 Unsupported language feature: 'Object'
[DCC Error] mORMot.pas(4854): E1025 Unsupported language feature: 'Object'
[DCC Error] mORMot.pas(8915): E1025 Unsupported language feature: 'Object'
[DCC Error] mORMot.pas(8911): E1025 Unsupported language feature: 'Object'
[DCC Error] mORMot.pas(8915): E1025 Unsupported language feature: 'Object'
[DCC Error] mORMot.pas(10726): E1025 Unsupported language feature: 'Object'
[DCC Error] mORMot.pas(16072): E1025 Unsupported language feature: 'Object'
[DCC Error] mORMot.pas(16081): E1025 Unsupported language feature: 'Object'
Am I missing some directives or something similar?
Offline
Which compiler version?
On which target?
Did you define the following conditional:
{.$define USEPACKAGES}
// define this if you compile the unit within a Delphi package
// - it will avoid error like "[DCC Error] E2201 Need imported data reference ($G)
// to access 'VarCopyProc' from unit 'SynCommons'"
// - shall be set at the package options level, and left untouched by default
Offline
Changed Conditional defines at project level to be as follows: USEPACKAGES;DEBUG and included {.$define USEPACKAGES} in .dpk file.
Compiling for 32 bit WIndows target.
Using Delphi XE2 Update 4 Hotfix 1, also have IDE Fix pack XE2 5.95 installed.
Same error still occurring.
Offline
If i include SynBidirSock in an app it compiles just fine.
My uses clause from a mormot perspective in package (that fails to compile) includes the following: SynCrtSock, SynCommons, mORMot, mORMotHttpClient
Offline
I wanted to use packages to pursue a plugin based approach with specific implementations relying on mormot.
Offline
I have figured it out. In Project Options -> Delphi Compiler -> Output - C/C++ menu the setting C/C++ Output File generation DEFAULTS to Generate all C++ Builder files (including package libs) even for a Delphi package....
Change this setting to Generate DCUs only, recompile... resulting in 0 errors. Hope this helps someone else.
Last edited by Del (2017-03-28 20:48:53)
Offline
Thank you Del. I am considering packages for the same exact reason as you mention.
Offline
Excellent Del, I have been trying to get mORMot to compile into a package with the same problems as yourself and this seems to have fixed things.
Offline
Great work , thanks Del! Your report just saved me!
Offline
Pages: 1