Closed fastbike closed 2 years ago
I've just found this SO discussion, not sure of the relevance but it mentions an interface with an untyped parameter https://stackoverflow.com/questions/3458500/what-does-delphi-compiler-error-e2134-mean
In particular this comment describes what I am seeing
It appears to happen only when IThingContainer defines interface methods that contain untyped parameters in functions. What is really odd, is that sometimes you can define untyped parameters in functions, and some times you can not.
I'll have to read the SO post and check whether there are QP reports. Do I understand you correctly, that you do not use any DEC interfaces as interfaces but the compilation error comes from having these interface declarations "pulled in" when compiling as DLL?
Yes, it appears to be the case. If I comment out the method in the interface with the untyped parameter it will compile. I experimented as {M-} before the declaration of the interface ...
{$M-}
/// <summary>
/// Common interface for all ciphers. Some ciphers may have additional
/// methods/properties though!
/// </summary>
IDECCipher = Interface
['{73D70F28-95C0-4715-8C27-1AE6FBEE9698}']
...
... but this then caused another compilation error
[dcc64 Error] DECHashAuthentication.pas(539): E2266 Only one of a set of overloaded methods can be published
in the DECHashAuthentication.pas unit. Adding the "public" visibility specifier ahead of the offending method fixed that though
public
function CalcStream(const Stream: TStream; Size: Int64; Format: TDECFormatClass = nil;
const OnProgress:TDECProgressEvent = nil): RawByteString; overload;
As I noted none of this occurs in the EXE version ,just the DLL version. And I'm not using the interfaced versions of the ciphers.
I'm in contact with somebody from EMBT. In order to have a look at the matter this person would like to have map files from you. Can you provide a map file from the compilation which fails and perhaps one from the exe where it succeds? If you do not want to post them in public you can send them per mail to me. My e-mail address is in the NOTICE.txt file.
Another question which came up was, whether it compiles in a regular DLL, so it would be restricted to ISAPIDLLs only? Can you perform a small check?
I'm not sure yet what to do with the "public" fixing the E2266 failure. Select the most likely candidate of each such overloaded method and add public?
I'm in contact with somebody from EMBT. In order to have a look at the matter this person would like to have map files from you. Can you provide a map file from the compilation which fails and perhaps one from the exe where it succeds? If you do not want to post them in public you can send them per mail to me. My e-mail address is in the NOTICE.txt file.
Another question which came up was, whether it compiles in a regular DLL, so it would be restricted to ISAPIDLLs only? Can you perform a small check?
OK, will do on Monday. My guess is that the ISAPI web units are doing something with the {M+} directive ?
It looks like the map file does not contain what the EMBT engineer was loocking for. I'll try if I can get him to contact you directly, so I don't need to play the postman any longer. ;-)
Check the compiler options of the DLL - if it has "Emit runtime type information" set - that is like globally turning on {$M+}
for every type
Check the compiler options of the DLL - if it has "Emit runtime type information" set - that is like globally turning on
{$M+}
for every type
This was turned on, turning it off allows successful compilation. However, what effect will it have on our use of:
I'll need to run some tests
May I close this issue now, or shall I keep it open for you to report the consequences this has on the mentioned items?
Keep it open and I will report back by end of week
I've checked and it seems to have no effect on Eurekalog, or the (new) RTTI functions
I have a project group that uses the DEC code base to replace some older DCrypt units.
There are two projects sharing the same code: one is compiled as a console EXE that runs a web server under localhost, the other is an ISAPI dll. So apart from the DPR file the code base is the same.
I can compile the EXE, but the DLL compilation fails with this error
[dcc64 Error] DECCipherInterface.pas(746): E2134 Type '<void>' has no type info
Commenting out the line at 486 in this unit
procedure Init(const Key; Size: Integer; const IVector; IVectorSize: Integer; IFiller: Byte = $FF); overload;
allows compilation to succeed.This method declaration contains an untyped parameter. Is this causing the failure ? And if so why does it compile under the EXE but not the DLL?