"Oldham, Adam" a écrit :
phileif.pas:1102: incompatible type for argument 1 of `Getcurlangphrase'
This function is being called as such: GetCurLangPhrase(Asterisk, 2, AddrType(@SearchStr));
The Prototype for the function is: PROCEDURE GetCurLangPhrase( Phrase_Id : eSysMessages; Buf_Size : INTEGER; Phrase_Buf : AddrType );
And lastly eSysMessages is an enumerated type containing Asterisk from the call.
OK.... The Function is declared in a file called sysutl.pas, eSysMessages is in a global.pas, and the call of GetCurLangPhrase is in phileif.pas. Now, sysutl compiles to object code with no errors or warnings as does global. And phileif.pas USES both global and sysutl with the UNITs being defined correctly. This compiles with an old non-standard compiler, but doesn't with GPC and I can't figure it out for the life of me.
Seems to be what is described in the section of the gpc manual: known bugs in GPC, urgent, things left to do until the next release of gpc:
enumeration types declared within a set or record type or variable or constant declaration or the case selector of a record within a unit are not visible in the main program (fjf211.pas, fjf239[ab].pas) enumeration types do not always properly survive transport through two interfaces (russell2.pas, miguel2.pas, daj2.pas)