Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does not compile in Lazarus installed with fpcupdeluxe #12

Open
raelb opened this issue Sep 17, 2024 · 3 comments
Open

does not compile in Lazarus installed with fpcupdeluxe #12

raelb opened this issue Sep 17, 2024 · 3 comments

Comments

@raelb
Copy link

raelb commented Sep 17, 2024

Hi,
I have installed fpc and Lazarus with latest version of fpcupdeluxe (https://github.com/LongDirtyAnimAlf/fpcupdeluxe) - v2.4.0e, selecting the stable version. It installs fpc 3.2.2 and Lazarus v3.4. (Pic below)

Adding superobject to a project, does not compile:

image

Here is the compile log:
Hint: (11030) Start of reading config file D:\fpcupdeluxe\fpc\bin\x86_64-win64\fpc.cfg
Hint: (11031) End of reading config file D:\fpcupdeluxe\fpc\bin\x86_64-win64\fpc.cfg
Free Pascal Compiler version 3.2.2-r0d122c49 [2024/09/17] for x86_64
Copyright (c) 1993-2021 by Florian Klaempfl and others
(1002) Target OS: Win64 for x64
(3104) Compiling superobject_test.lpr
(3104) Compiling unit1.pas
(3104) Compiling .\Lib\superobject.pas
D:\fpcupdeluxe\ccr\demos\SuperObject.Delphi.\Lib\superobject.pas(249,9) Warning: (5079) Unit "Rtti" is experimental
D:\fpcupdeluxe\ccr\demos\SuperObject.Delphi.\Lib\superobject.pas(1135,49) Error: (5000) Identifier not found "TCustomAttribute"
D:\fpcupdeluxe\ccr\demos\SuperObject.Delphi.\Lib\superobject.pas(1135,49) Error: (4009) class type expected, but got ""
D:\fpcupdeluxe\ccr\demos\SuperObject.Delphi.\Lib\superobject.pas(1137,43) Error: (5000) Identifier not found "TCustomAttribute"
D:\fpcupdeluxe\ccr\demos\SuperObject.Delphi.\Lib\superobject.pas(1137,43) Error: (4009) class type expected, but got ""
D:\fpcupdeluxe\ccr\demos\SuperObject.Delphi.\Lib\superobject.pas(1149,43) Error: (5000) Identifier not found "TCustomAttribute"
D:\fpcupdeluxe\ccr\demos\SuperObject.Delphi.\Lib\superobject.pas(1149,43) Error: (4009) class type expected, but got ""
D:\fpcupdeluxe\ccr\demos\SuperObject.Delphi.\Lib\superobject.pas(1161,43) Error: (5000) Identifier not found "TCustomAttribute"
D:\fpcupdeluxe\ccr\demos\SuperObject.Delphi.\Lib\superobject.pas(1161,43) Error: (4009) class type expected, but got ""
D:\fpcupdeluxe\ccr\demos\SuperObject.Delphi.\Lib\superobject.pas(1170,41) Error: (5000) Identifier not found "TCustomAttribute"
D:\fpcupdeluxe\ccr\demos\SuperObject.Delphi.\Lib\superobject.pas(1170,41) Error: (4009) class type expected, but got ""
D:\fpcupdeluxe\ccr\demos\SuperObject.Delphi.\Lib\superobject.pas(1228,46) Error: (5000) Identifier not found "TRttiField"
D:\fpcupdeluxe\ccr\demos\SuperObject.Delphi.\Lib\superobject.pas(1229,49) Error: (5000) Identifier not found "TRttiField"
D:\fpcupdeluxe\ccr\demos\SuperObject.Delphi.\Lib\superobject.pas(1417,47) Fatal: (10026) There were 12 errors compiling module, stopping
Fatal: (1018) Compilation aborted

image

@pult
Copy link
Owner

pult commented Sep 18, 2024

Custom Attribute is supported from compiler 3.3.1 ( your 3.2.2 ).
https://wiki.freepascal.org/Custom_Attributes

Try disabling "{$define HAVE_RTTI}" in "superobject.pas".
For example, like this:

{$IFDEF FPC}
  {$define HAVE_INLINE}
  ...
  {$if (fpc_version>3) or ( (fpc_version=3) and ((fpc_release>3) or ((fpc_release=3) and (fpc_patch>0))) )}
    {$define HAVE_RTTI} // optional
  {$ifend}
...

Fix (Not tested) 431a3cc

@raelb
Copy link
Author

raelb commented Sep 18, 2024

Thanks, that works, and I can compile my project fine on Windows 10.

However, I also installed fpcupdeluxe on wsl (ubuntu). When I try to compile on that system (linux 64), I get this error:

image

@pult
Copy link
Owner

pult commented Sep 25, 2024

Fix (Not tested): FPC no member "TTimeZone.Local" ed20991

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants