Recent

Author Topic: unit form unknown in create file, but ok in compile and execute  (Read 622 times)

axel18

  • Newbie
  • Posts: 2
in my program windows os,  there are these lines :

uses
Classes, SysUtils, Dialogs, Forms, Controls, Graphics, StdCtrls, Spin;

The program is ok in the compilation and i can execute it, but  i can t create the execute file.
Error raised  : Forms  is unknown !
I have moved  forms to the end of the line and it was ok once  !
Classes, SysUtils, Dialogs,  Controls, Graphics, StdCtrls, Spin, Forms;
but now, error raised  Controls is unknown  !

I don't understand if you have a idea ? line too short
     


dseligo

  • Hero Member
  • *****
  • Posts: 1333
Re: unit form unknown in create file, but ok in compile and execute
« Reply #1 on: August 16, 2024, 02:02:40 am »
What is your Lazarus version?
How did you create your project? Did you go to the menu Project, then select 'New Project...' and then 'Application' (first item)?
Do you have 'LCL' in Required Packages of Project Inspector (menu Project, Project Inspector)?

axel18

  • Newbie
  • Posts: 2
Re: unit form unknown in create file, but ok in compile and execute
« Reply #2 on: August 16, 2024, 01:15:35 pm »
Thank you for your help :
version of lazarus is  version 3.4 date 2024/08/12 version fpc 3.2.2.
Yes for this : How did you create your project? Did you go to the menu Project, then select 'New Project...' and then 'Application' (first item)?  I'm "newbie" so I don t create "special experimentation ! :-)
and no for the 3rd question

I'll uninstall and create a new setup of lazarus and fpc.   Thank you for your help.

TRon

  • Hero Member
  • *****
  • Posts: 3127
Re: unit form unknown in create file, but ok in compile and execute
« Reply #3 on: August 16, 2024, 01:23:35 pm »
and no for the 3rd question
Thanks to dseligo and your answer you have pinpointed the origin for your problem :)

Quote
I'll uninstall and create a new setup of lazarus and fpc.   Thank you for your help.
No need for re-installation. Just add the LCL requirement under required packages. Which is strange that you need to do that because the Lazarus IDE adds that dependency by default when creating a new application project (see attachment).

Did you by any chance (perhaps accidentally) removed that dependency ?
« Last Edit: August 16, 2024, 01:27:26 pm by TRon »
All software is open source (as long as you can read assembler)

 

TinyPortal © 2005-2018