Running wxWidgets App on OSX

General questions regarding the usage of CodeLite
marfi
CodeLite Expert
Posts: 159
Joined: Mon Nov 03, 2008 9:17 pm
Contact:

Running wxWidgets App on OSX

Post by marfi »

Hi, I've just got my first Mac and I'm trying to build wxWidgets application using CodeLite rev 2841. The application has been build successfully, but when I try to run it, then it is opened in a terminal and I'm not able to operate with the application's frame - only active window is the terminal window. Also menu shown on the top of my LCD belongs to the terminal, not to the wxWidgets application. The same problem occurs also if I run the application directly from Finder. Should I specify some special option during the application's build to avoid displaying of the terminal window?
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Running wxWidgets App on OSX

Post by eranif »

Have a look at this post here:

http://codelite.org/forum/viewtopic.php ... wxMac#p880

Eran
Make sure you have read the HOW TO POST thread
marfi
CodeLite Expert
Posts: 159
Joined: Mon Nov 03, 2008 9:17 pm
Contact:

Re: Running wxWidgets App on OSX

Post by marfi »

Thank you! I tried to search this forum before but I probably used wrong query :) I found the solution here: http://wiki.wxwidgets.org/WxMac-specific_topics. It was pretty simple; I've just added these program lines to my code

Code: Select all

#include <ApplicationServices/ApplicationServices.h>
 
ProcessSerialNumber PSN;
GetCurrentProcess(&PSN);
TransformProcessType(&PSN,kProcessTransformToForegroundApplication);
and everything(?) started to work perfectly.

Best regards
Michal
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Running wxWidgets App on OSX

Post by eranif »

Nice, I was not aware of this solution, I simply creates a bundle on Mac, since it is the native thing to do on Mac.

Eran
Make sure you have read the HOW TO POST thread
Post Reply