When writing a Lazarus program, you have the option to use $APPTYPE consoleor deselect Win32 GUI Application( -WG) in the project settings.
$APPTYPE console
Win32 GUI Application
-WG
I noticed that without these options DebugLn, and WriteLnthere are exceptions. Is there a way to create a console, even if the program is not compiled above the above options and then displays it with DebugLnand WriteLn?
DebugLn
WriteLn
Delphi. Delphi , , AllocConsole. Lazarus/FreePascal, :
AllocConsole
uses Windows; begin AllocConsole; // in Windows unit IsConsole := True; // in System unit SysInitStdIO; // in System unit // Now you can do Writeln, DebugLn, ... end.
, . iirc linux , . . , .
, , GUI-, , . .
, , , , Application.ShowMainForm:=False;
Application.ShowMainForm:=False;
Application.CreateForm(TForm1, Form1);
.lpr.
, showmessage ().
Source: https://habr.com/ru/post/1538024/More articles:Lua - nils in table constructor - lua-tableHow to set up Meteor-ui modal pop-up accounts? - meteorRegardless of the platform, is it safe to use Writeln to Output? - delphiCan bash be used to create a server? - bashInstall SDK for Sharepoint Phone for Visual Studio 2013 Professional - visual-studio-2013Error in System.Windows.Control.RichTextBox - c #window.open () is blocked by the browser when called with a promise - javascriptUnit test code that interacts with the database without creating data in the database - c #iOS Dropbox API - Reauthentication (Error 401) - iosIs it a good practice to end method names using the old asynchronous template with "Async"? - c #All Articles