Lazarus

Programming => Operating Systems => macOS / Mac OS X => Topic started by: Renat.Su on March 21, 2018, 08:43:50 am

Title: Console when the software starts
Post by: Renat.Su on March 21, 2018, 08:43:50 am
I just notice than I full newbie in MacOs. Prior to that, I made versions for Windows and Debian/Ubuntu.
I have compiled a MacOS version of my software. Using a cross-compiler. Sent to the MacOS users. When they start together with the software runs the console. What it could be. What did I do wrong?
Compile ib Ubuntu Lazarus. Target: Darwin/x86-84 widjet: cocoa.
Title: Re: Console when the software starts
Post by: Thaddy on March 21, 2018, 09:32:16 am
Code: Pascal  [Select][+][-]
  1. program myguiapp;
  2. {$apptype GUI}
  3. begin
  4. end.
See https://www.freepascal.org/docs-html/current/prog/progsu86.html#x94-930001.3.3

As usual reading manuals would have helped you out.

If you want to avoid the hint, do it like so (given your platforms):
Code: Pascal  [Select][+][-]
  1. {$ifndef LINUX}{$apptype GUI}{$endif}

As per the documentation,  Windows, Mac, OS2 and AmigaOS will open a console if {$apptype GUI} is not specified, even if it is a GUI application.
On other platforms it is ignored, but it throws a hint.
Title: Re: Console when the software starts
Post by: Renat.Su on April 16, 2018, 05:31:10 pm
Thank you very much! Sorry, I could not check immediately. However there was another (http://forum.lazarus.freepascal.org/index.php/topic,40934.0.html) problem at startup
TinyPortal © 2005-2018