Recent

Author Topic: Console when the software starts  (Read 1125 times)

Renat.Su

  • Full Member
  • ***
  • Posts: 107
    • Renat.Su
Console when the software starts
« 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.
« Last Edit: March 21, 2018, 08:51:12 am by Renat.Su »

Thaddy

  • Hero Member
  • *****
  • Posts: 7195
Re: Console when the software starts
« Reply #1 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.
« Last Edit: March 21, 2018, 09:46:29 am by Thaddy »
inline variables like in D10.3 are a bit like Brexit: if you are given the wrong information it sounds like a good idea. Every kid loves candy, but it makes you fat and your teeth will disappear.

Renat.Su

  • Full Member
  • ***
  • Posts: 107
    • Renat.Su
Re: Console when the software starts
« Reply #2 on: April 16, 2018, 05:31:10 pm »
Thank you very much! Sorry, I could not check immediately. However there was another problem at startup
« Last Edit: April 16, 2018, 05:37:00 pm by Renat.Su »