Page 1 of 1
Running wxWidgets App on OSX
Posted: Tue Jun 23, 2009 11:43 am
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?
Re: Running wxWidgets App on OSX
Posted: Tue Jun 23, 2009 2:03 pm
by eranif
Re: Running wxWidgets App on OSX
Posted: Tue Jun 23, 2009 5:33 pm
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
Re: Running wxWidgets App on OSX
Posted: Tue Jun 23, 2009 6:37 pm
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