Recent

Author Topic: [SOLVED} Need Help WIth strings.pp  (Read 483 times)

Sandstone

  • New Member
  • *
  • Posts: 11
[SOLVED} Need Help WIth strings.pp
« on: October 27, 2020, 04:33:02 pm »
I am working on compiling an application and have come to something I don't understand. I get the error message on {$i strings.inc } that strings.pp(109,2) Fatal: Cannot open include file "strings.inc". When I click on show the declaration, It pulls up the correct strings.inc file (attached.)
« Last Edit: November 06, 2020, 10:12:02 pm by Sandstone »

PascalDragon

  • Hero Member
  • *****
  • Posts: 2405
  • Compiler Developer
Re: Need Help WIth strings.pp
« Reply #1 on: October 28, 2020, 09:25:34 am »
I am working on compiling an application and have come to something I don't understand. I get the error message on {$i strings.inc } that strings.pp(109,2) Fatal: Cannot open include file "strings.inc". When I click on show the declaration, It pulls up the correct strings.inc file (attached.)

Can you show the parameters that Lazarus passes to the compiler? See Project -> Project Settings -> Show settings (at the bottom). I have the feeling that someone passes a path to the source files of FPC which should not be the case.

Sandstone

  • New Member
  • *
  • Posts: 11
Re: Need Help WIth strings.pp
« Reply #2 on: October 28, 2020, 06:27:30 pm »
usr/bin/fpc
-MDelphi
-Scghi
-Cg
-O1
-g
-gl
-l
-vewnhibq
-Filib/x86_64-linux
-Fu/usr/share/fpcsrc/3.2.0/rtl/inc
-Fu/usr/share/lazarus/2.0.10/components/virtualtreeview/lib/x86_64-linux-gtk2
-Fu/usr/share/lazarus/2.0.10/components/ideintf/units/x86_64-linux/gtk2
-Fu/usr/share/lazarus/2.0.10/components/lclextensions/lib/x86_64-linux-gtk2
-Fu/usr/share/lazarus/2.0.10/components/lazcontrols/lib/x86_64-linux/gtk2
-Fu/usr/share/lazarus/2.0.10/lcl/units/x86_64-linux/gtk2
-Fu/usr/share/lazarus/2.0.10/lcl/units/x86_64-linux
-Fu/usr/share/lazarus/2.0.10/components/lazutils/lib/x86_64-linux
-Fu/usr/share/lazarus/2.0.10/packager/units/x86_64-linux
-Fu.
-FElib/x86_64-linux
-olib/x86_64-linux/OrganBuilder
-dLCL
-dLCLgtk2
-dBorland
-dVer150
-dDelphi7
-dCompiler6_Up
-dPUREPASCAL

Handoko

  • Hero Member
  • *****
  • Posts: 3902
  • My goal: build my own game engine using Lazarus
Re: Need Help WIth strings.pp
« Reply #3 on: October 28, 2020, 06:54:55 pm »
I can reproduce same error message if I add this:
/usr/share/fpcsrc/3.2.0/rtl/inc
in to Other unit files (-Fu).

Lazarus main menu > Project > Project Options > Compiler Options > Paths > Other unit files (-Fu)

Tested on Lazarus 2.0.10 Linux GTK2.

Sandstone

  • New Member
  • *
  • Posts: 11
Re: Need Help WIth strings.pp
« Reply #4 on: October 28, 2020, 08:19:59 pm »
OK, I took that out and I get something along another line: Organ.pas(523,22) Error: Identifier not found "TSize"
I thought that by adding the path /usr/share/fpcsrc/3.2.0/rtl/inc the compiler would pick up the definitions typshrdh.inc and typshrd.inc
Is this in one of the Lazarus packages?

bytebites

  • Sr. Member
  • ****
  • Posts: 342
Re: Need Help WIth strings.pp
« Reply #5 on: October 28, 2020, 09:21:36 pm »
Unit Types

Sandstone

  • New Member
  • *
  • Posts: 11
Re: Need Help WIth strings.pp
« Reply #6 on: October 29, 2020, 03:42:07 am »
Thanks, that got me moving again. Running into other issues but I'm managing to work them out. AFAIK this code was only built for Windows by the original author (long gone.) I've been running it using PlayOnLinux but would like to be able to build it on Linux.  :(

PascalDragon

  • Hero Member
  • *****
  • Posts: 2405
  • Compiler Developer
Re: Need Help WIth strings.pp
« Reply #7 on: October 29, 2020, 09:16:17 am »
OK, I took that out and I get something along another line: Organ.pas(523,22) Error: Identifier not found "TSize"
I thought that by adding the path /usr/share/fpcsrc/3.2.0/rtl/inc the compiler would pick up the definitions typshrdh.inc and typshrd.inc
Is this in one of the Lazarus packages?

No, if a type is missing you don't add paths to the project, you add units to the uses-clause of the unit where the type is missing.

Thanks, that got me moving again. Running into other issues but I'm managing to work them out. AFAIK this code was only built for Windows by the original author (long gone.) I've been running it using PlayOnLinux but would like to be able to build it on Linux.  :(

In that case I'd suggest you to first build it for Windows (if you don't have a Windows yourself you can either prepare a Win32 cross compiler from Linux or you can simply install Lazarus for Windows in Wine) to check whether it works correctly and then tackle the problem of porting it to Linux.

Sandstone

  • New Member
  • *
  • Posts: 11
Re: Need Help WIth strings.pp
« Reply #8 on: October 29, 2020, 08:10:00 pm »
Thanks to everyone! I installed Lazarus in PlayOnLinux and it worked great! I found out that the issue is not with trying to compile in Linux -- the Delphi source code I found was buggy. I had the same compile errors in the Windows version. Also, it wasn't mentioned that there was a class TAudioPlayer used from the Delphi Wave Audio package  >:D
I'm going back to trying to build in Linux. My thought is to replace TAudioPlayer with something else that will play a WAV file in ALSA.

 

TinyPortal © 2005-2018