Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 537197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:54:05+00:00 2026-05-13T09:54:05+00:00

I have a project on Lazarus that have two Forms, FormMain and OutputForm .

  • 0

I have a project on Lazarus that have two Forms, FormMain and OutputForm. I want to show a output on OutputMemo at the second Form with this code:

procedure FormMain.ShowButton(Object: Sender);
begin 
  if SaveDialog1.Execute then 
    AProcess := TProcess.Create(nil); 
  AProcess.CommandLine := 'gcc.exe ' + SaveDialog1.FileName + ' -o ' TextField23.Text; 
  AProcess.Options := AProcess.Options + [poWaitOnExit, poUsePipes]; 
  AProcess.Execute; 

  OutputForm.OutputMemo.Lines.BeginUpdate; 
  //OutputForm.OutputMemo.Lines.Clear; 
  OutputForm.OutputMemo.Lines.LoadFromStream(AProcess.Output); 
  OutputForm.OutputMemo.Lines.EndUpdate; 

  AProcess.Free; 
end;

But when I try to compile this code, I got the error:

Identifier not found “OutputForm”

At the top of OutputForm unit I have:

unit Output;

And when I try to call it from FormMain unit(OutputForm: Output;) I got this error:

Error in type definiition

What I have to do?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T09:54:06+00:00Added an answer on May 13, 2026 at 9:54 am

    As RRUZ said, you need a reference to the unit where OutputForm is declared. Here’s the basic idea:

    Each form has a form declaration file (DFM in Delphi; I think Lazarus calls them LFMs) and a corresponding Object Pascal unit file (.PAS) where you put their code. This is a normal unit file like any other, as far as the compiler’s concerned. The only difference is that it has a form associated with it.

    Open the code for OutputForm and look at the top. It’ll say something like “unit OutputForm;” Copy the unit name, and paste it into the uses clause of FormMain’s unit, and then it should work.

    EDIT: Not quite sure what you’re trying to do with that edit, but you don’t need to redeclare OutputForm. It should already be declared as a global variable in the Output unit. You just need to add Output to your uses clause, so you’ll end up with something similar to this:

    unit Main;
    
    interface
    
    uses
      Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
      Output; //on a separate line to show it's not a system lib
    
    type
      TFrmMain = class(TForm)
      ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project on Lazarus that I want to compile a source using
I have project on recruitment.In this project, at one form I have a grid
I have a project written in Lazarus on Windows, but I want to cross-compile
I have project I want to upgrade to .Net4 and it use BackgroundCopyManager.dll. Anyone
I have project in Dropbox and two running laptops: one with Ubuntu and one
folks! I have project in cc.net and this project nay start by 3 ways
I have project written in C#. I create install project for this project, and
I have project, this contains header files like. #import Three20/TTButton.h #import Three20/TTStyle.h #import Three20/TTStyleSheet.h
I have project with my resources (resx files), and I want to use them
I want to have project documentation in wiki format and commit to version control

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.