Recent

Author Topic: Compiling gzio.pas  (Read 5302 times)

sarason

  • Jr. Member
  • **
  • Posts: 77
Compiling gzio.pas
« on: July 31, 2014, 01:36:05 pm »
My program has started to compile the lazarus source file gzio.pas, what causes these little detours when I never made a call to this unit . Oh and it fails as it cannot recompile the Dos unit

regards sarason

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: Compiling gzio.pas
« Reply #1 on: July 31, 2014, 09:22:55 pm »
what causes these little detours when I never made a call to this unit
Directly or indirectly, one of the units you are using did call gzio.pas.

Oh and it fails as it cannot recompile the Dos unit
It failed because it does not know where to find the Dos unit. (me neither: source\rtl\win\dos.pp maybe?)

Quote
PPU Loading C:\lazarus\fpc\2.6.0\units\i386-win32\rtl\dos.ppu
Recompiling dos, checksum changed for Strings {impl}
gzio.pas(22,3) Fatal: Can not find dos used by gzio, ppu=..\..\..\..\units\i386-win32\rtl\dos.ppu
I was going to ask you if you used another compiler, but a quick search showed that you passed through this before  :(

sarason

  • Jr. Member
  • **
  • Posts: 77
Re: Compiling gzio.pas
« Reply #2 on: August 01, 2014, 11:59:50 pm »
The program has compiled and I am working through the runtime errors in Delphi2007.
I would like to have it running in Lazarus ! have about 150 errors left to be removed in the body of the code which are mostly in the Inc files, It takes me about 1 hour in Delphi2007 to remove a bug in an inc file, due to the fact that the Find Declaration function doesn't work in Delphi in an Inc file, while it is just fantastic in Lazarus that it works perfectly So I can easily speed through the cleanup in Lazarus.

Just this little bug, which I am sure is not me.

regards sarason

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: Compiling gzio.pas
« Reply #3 on: August 02, 2014, 09:40:30 pm »
Well, I think I found the reason.

Do you have a unit in your project named "strings"?

It it conflicting with the one in RTL. You need to do two things:
1-Change its name. Strings.pas and strings.pp both are bad names.
2-Delete strings.* in "your application"\lib\i386-win32
2-Just to stress this one: "Delete strings.*" includes strings.ppu and strings.o. Deleting one of them is not enough!!

sarason

  • Jr. Member
  • **
  • Posts: 77
Re: Compiling gzio.pas
« Reply #4 on: August 20, 2014, 10:28:57 am »
Ok, I haven't worked on this program for a while and hadn't noticed your post at the time I was working on it . So my apologies for this late response.

But Engkin you were right on the money I did have a unit named Strings which was basically a copy of the old TP Strings Unit. The irritation was that it was used about 150 times through the program. The main fun was the StrComp, and since this program uses the traditional pascal strings, I can't move it forward to XE6, FMX etc until I get it successfully running under at least Delphi 2007 or Lazarus 2.7.1 ( It uses Create in Records, so that was throwing as well). Changing all the calls from Strings to SysUtils, got the program running (well at least to the fully compiled stage!!) Now I have another 150 errors in the INC files to work through as well as my runtime errors and I am on my way again.

The one thing that was not obvious was that no error message or at least a warning was being generated by Lazarus for my mistake of having a name the same as a System file, but instead FPC just starts recompiling its internal code. Not a good state of affairs.

Anyway thanks for the Help Engkin

regards sarason

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Compiling gzio.pas
« Reply #5 on: August 20, 2014, 10:40:48 am »
The one thing that was not obvious was that no error message or at least a warning was being generated by Lazarus for my mistake of having a name the same as a System file, but instead FPC just starts recompiling its internal code. Not a good state of affairs.

Indeed a bad state of affairs. The FPC source should be in the IDE search path (like debugger/source path in Delphi) and not in the compiler path (like unit search path in Delphi)

 

TinyPortal © 2005-2018