Jump to content
JGMS

FMX package units not found after FmxLinux installation

Recommended Posts

Quote

I have installed FmxLinux, got the PaServer up and running (D12 in Windows11, WSL2, Ubuntu22.04) and added and selected the LinuxPlatform in a new, multi-device, blank application: a form with a single button.

In the project file (shown below) the problem is already hinted, showing:  'E2212: Package unit "FMX.Forms" cannot appear in contains or uses clauses'.

FireMonkey applications for Windows run fine, so FMX package units cannot be missing.

What can be wrong?

 


program Project1;

uses
  System.StartUpCopy,
  FMX.Forms, <<== design-time error hint 'E2212: Package unit "FMX.Forms" cannot appear in contains or uses clauses'
  Unit1 in 'Unit1.pas' {Form1};

{$R *.res}

begin
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.Run;
end.

var
  Form1: TForm1;

implementation

{$R *.fmx}

end.

 

 

Share this post


Link to post

Did you install FMXLinux via getit ?

Share this post


Link to post
Posted (edited)

Jus did a Form with a button and it works against Ubuntu, CentOS7, Rocky8
But I have the FMX.Forms in the main unit uses section, not in the project file.

Screenshot 2024-04-08 at 09.29.46.png

 

For your info, I just installed FMXLinux from GetIt and didn't configure anything else.

I think a requirement is that you need a Linux connection and SDK before installing but that's about it.
It didn't require any path definitions, etc...

 

Screenshot 2024-04-08 at 09.29.12.png

Edited by sjordi

Share this post


Link to post
Posted (edited)

Thank you @Serge_G and @sjordi for taking time to answer.
 

Initially I had FMX installed by using the installer V1.77 that comes with the updates that I got from the original developer (I bought a lifetime version a couple of years ago). It always ran perfect, except for this time.

Because of the error I subsequently installed it via GetIT (V1.76), but this yielded the same error.
I quess things will get better after a fresh installation of the latest update to Delphi version 12.1.

I will keep you informed.

 


I

Edited by JGMS

Share this post


Link to post

The install should define all the library and search paths for you if you install via GetIt.
And the FMX.Form has nothing to do in the dpr or dproj file, but in the unit that uses it (the main form).

Good luck

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×