JGMS 2 Posted March 28 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
sjordi 39 Posted April 8 (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. 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... Edited April 8 by sjordi Share this post Link to post
JGMS 2 Posted April 8 (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 April 8 by JGMS Share this post Link to post
sjordi 39 Posted April 8 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
duzzell 0 Posted October 23 I'm seeing this same error with Delphi 12.1 compiling for Linux. @JGMS did this clear up for you? Share this post Link to post
sjordi 39 Posted October 23 Just from the top of my head, you absolutely need a Linux profile defined in your editor, either Ubuntu, Rocky or CentOS. Do you have one that is not only defined, but on which you installed PAServer, connected to it, and then, mandatory, added a Linux SDK? Then FMXLinux... Share this post Link to post
duzzell 0 Posted October 24 I have a Linux deployment profile (Ubuntu) configured. Connection to it succeeds. If I make a new project, say MasterDetailApplication, building succeeds for all platforms but Linux. The project file uses FMX.Forms. I see errors: Package unit 'FMX.Forms' cannot appear in contains or uses clauses... Undeclared identifier 'Application'... I'm using the FMXLinux installed by the Delphi 12.1 web installer. I have not tried installing FMXLinux from GetIt. Share this post Link to post
sjordi 39 Posted October 24 Just checked on my Athens 12.2 and Ubuntu. Created an empty MasterDetailApplication, works like a charm. Here is a screenshot. Where do you declare FMX.Forms? It's in the main form class and as well in the .dpr file. Did you tinker with them or not? Did you change any of your default IDE paths? Here are mine (My Documents is on the Mac, hence the y:\Documents but it should not change anything for you) for default ones and overrides. I also include my empty project for you to check. UbuntuMasterDetails.zip Share this post Link to post
duzzell 0 Posted October 24 I haven't changed anything about the stock MasterDetail app. FMX.Forms is declared in both the project file and the main unit. I've done no tinkering. I have added paths but not changed any of the existing ones, I believe. Your empty project behaves exactly as mine does, giving the same errors. I will check my paths against yours... Thanks for taking your time to help me. Share this post Link to post
sjordi 39 Posted October 24 Did you install Delphi in a clean VM or over an existing previous version? I try to always have an empty Windows 10 or 11 VM from which I install RadStudio clean. That way, I'm always sure I don't face trailing registry keys, etc... Even if they're supposed to be fully compartmented to the specific product, sometimes, Windows does funny things. Good luck. Steve Share this post Link to post
duzzell 0 Posted October 25 The story... I've already reinstalled Delphi 12.1 since installing it originally. That was because of a Linux problem. Reinstalling 'fixed' the problem. I just uninstalled and reinstalled Delphi. No special cleaning operations. But now another Linux problem has cropped up. I see over and over people running Delphi on a VM. I tried that a few years back on a Mac. I forget the details but it had 16 GB RAM and an open source VM system (Parallels? or maybe free VMWare?). Delphi's jerky performance on the VM drove me nuts. I finally decided to go back to giving Delphi its own machine. I'm don't want to take the time right now to go back to a VM, even though it sounds like a good idea. Instead I'm going to spend my weekend going thru my Linux configuration with a fine toothed comb, trying to find what I'm doing wrong, and fix it. So you just opened my eyes. I've got an ongoing, persistent Linux problem. I'd 'forgotten' about my other Linux problem until I talked to you. Share this post Link to post
duzzell 0 Posted October 26 I found nothing. I reinstalled FMXLinux from GetIt and everything works. Share this post Link to post