Page 1 of 1

How to disable console on App execution (macOS)

Posted: Thu Jun 11, 2020 12:05 pm
by Biggy
Hi all and sorry if I posted on wrong section !!

I'm on macOS (Catalina) and wxWidgets version 3.0.5 - I've installed wxWidgets with brew also wxFormBuilder. I created an example app and compiled with this command:

Code: Select all

g++ noname.cpp `wx-config --cxxflags --libs` -o myTestApp
it build fine and run but my "problem" is when I run the app it execute the console too.
How do I disable the console ?

Thank you in advance !

Re: How to disable console on App execution (macOS)

Posted: Thu Jun 11, 2020 3:15 pm
by ONEEYEMAN
Hi,
Can you build and run the minimal sample provided with the wxWidgets?
Also, since you are on OSX - you should create an App Bundle. When you build the minimal sample - last couple of commands will show you how to do that.

Thank you.

Re: How to disable console on App execution (macOS)

Posted: Thu Jun 11, 2020 3:36 pm
by Biggy
Hi, and thank you for reply. I'm not using Xcode to build my testapp. I followed these steps to create the testapp.

Re: How to disable console on App execution (macOS)

Posted: Thu Jun 11, 2020 3:40 pm
by ONEEYEMAN
Hi,
You shouldn't rely on any 3rd party resources.
Try to build the minimal sample and check the last couple of commands to create the minimal sample.

I don't know if C::B is capable to create a App Bundle on OSX - you might try to install it and give it a shot.

Thank you.

Re: How to disable console on App execution (macOS)

Posted: Fri Jun 12, 2020 7:08 pm
by BobsTheDude
Biggy wrote: Thu Jun 11, 2020 3:36 pm Hi, and thank you for reply. I'm not using Xcode to build my testapp. I followed these steps to create the testapp.
It's ok to use 3rd party libs static or dynamic.

The problem you are having is that the app is a Unix file not a Mac Pkg format. There are many suggestions on building Mac pkg formats but the easiest way is to download Xcode create a project and build from there.

I am familiar with that tutorial, so what I did was build the app, rename it to wxformbuilder and copied to the MacOS folder of the wxFormbuilder App, just to show all you need to make a pkg.


link to an example:
https://www.dropbox.com/s/3cw9itcm1bpig ... r.zip?dl=0

Re: How to disable console on App execution (macOS)

Posted: Fri Jun 12, 2020 7:25 pm
by ONEEYEMAN
Hi,
BobsTheDude wrote: Fri Jun 12, 2020 7:08 pm
Biggy wrote: Thu Jun 11, 2020 3:36 pm Hi, and thank you for reply. I'm not using Xcode to build my testapp. I followed these steps to create the testapp.
It's ok to use 3rd party libs static or dynamic.
No, it is not.
When you start with something you ALWAYS should start with the official way of doing things by checking the official documentation.
And when the official way fails - try the sample. Most OS (open source) projects have samples along with makefiles for the beginners to start with.

And only then - when everything else fails - you can go and check the 3rd party resources (not the 3rd party libs).
BobsTheDude wrote: Fri Jun 12, 2020 7:08 pm The problem you are having is that the app is a Unix file not a Mac Pkg format. There are many suggestions on building Mac pkg formats but the easiest way is to download Xcode create a project and build from there.

I am familiar with that tutorial, so what I did was build the app, rename it to wxformbuilder and copied to the MacOS folder of the wxFormbuilder App, just to show all you need to make a pkg.


link to an example:
https://www.dropbox.com/s/3cw9itcm1bpig ... r.zip?dl=0
Also, I'd rather let the OP do the research himself, so that (s)he becomes familiar with how to do a research in the future.

Thank you.

Re: How to disable console on App execution (macOS)

Posted: Fri Jun 12, 2020 7:29 pm
by BobsTheDude
Biggy wrote: Thu Jun 11, 2020 3:36 pm Hi, and thank you for reply. I'm not using Xcode to build my testapp. I followed these steps to create the testapp.
Here are a couple more resources that may help you.

Nice one.
https://github.com/iMokhles/wxWidgets-Xcode-Template

This one from this site
viewtopic.php?f=19&t=46804

I personally build static libs from the command line and add to Xcode.

Good luck with you project.