[fpc-pascal] will be work macro with name of the unit?

ulrich romrum at cbox.cz
Thu Jul 16 10:47:18 CEST 2015


Dne 15.7.2015 v 10:16 Michael Van Canneyt napsal(a):
>
>
> On Tue, 14 Jul 2015, ulrich wrote:
>
>> Hi,
>>
>> I have this unit, but when I compile it, I get this error:
>>
>> Illegal unit name XXX_Parser. The unit is saved under dfm_rrparser.pas.
>
> The unit name must always match the file name. This is logical, because
> otherwise the compiler can never find it if a reference to the unit is
> made in a uses clause.
>
I understand this. I thought that the compiler searches the unit by file 
name and unit name is stored inside the unit. Test if it is desired unit 
would be trivial - but I guess you're right - it would be pointless.

>>
>> Second question:
>>
>> Why not displayed $INFO directive in the message window (I have
>> enabled -vi switch in command line)?
>
> It shows it here:
> home: >fpc tm.pp -vwi
> Target OS: Linux for x86-64
> Compiling tm.pp
> User defined: compiled with XXX_
> tm.pp(10,17) Error: Illegal unit name: XXX_parser
> tm.pp(16,16) Fatal: There were 1 errors compiling module, stopping
> Fatal: Compilation aborted
> Error: /usr/local/bin/ppcx64 returned an error exitcode
>
> So probably a lazarus issue ?
>
> Michael.
> _______________________________________________
> fpc-pascal maillist  -
> fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
>





More information about the fpc-pascal mailing list