First, I want to apologize for bombarding the list with some bad questions. I have been thrown on this job porting Pascal code from one platform/compiler to Linux/GPC and I am having a tough time with it.
I am not sure exactly if this is a problem, or a feature of GPC, or a code problem on my end. In a nutshell, I have a makefile that runs through and compiles (but not links) Pascal source into the object files. I have fixed many inconsistencies between the compilers so far.... but this one is a bit stranger.
So far it compiles source files fine up to one where I get this error: 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. The odd thing is, I can comment the line out, and this will happen for other function calls where a value in an enumerated type sits in a function call.
Has anyone seen anything like this? Or does USES work differently with gpc than with other compilers?
Thanks for any help!
Adam Oldham Wishing he knew more about Pascal at this point.
----------------------------------------------------------------------- C. Adam Oldham Marconi Commerce Systems Inc. Software Engineer 7300 West Friendly Ave. adam.oldham@marconi.com Greensboro, NC 27420-2087 Phone : 336.547.5952 Fax : 336.547.5079 ----------------------------------------------------------------------- This document contains confidential information of Marconi Commerce Systems Inc. In consideration of the receipt of this document, the recipient agrees not to reproduce, copy, use or transmit this document and/or the information contained herein, in whole or in part, or to suffer such actions by others, for any purpose except with written permission, first obtained, of Marconi Commerce Systems Inc., and further agrees to surrender the same to Marconi Commerce Systems Inc. upon demand. -----------------------------------------------------------------------