wxWidgets with C++ in XCode 4

Hello, I think I have the right location for this thread.
I'm working on a C++ project where I need to create a GUI. I'm using wxWidgets, which is cross platform compatible. Now I know that Cocoa/Objective-C/not C++ is the option of choice for GUI programming on the Mac, but I need to do this with C++ and wxWidgets.
Now I have everything setup to get the form working, but my problem is compiling. I need to have a target that can compile C++ code that does more than just a console line. How do I compile and run C++ code that allows for GUI's? I'm running XCode 4

MacBook; iMac; iPod Touch (1st Gen); iPhone 3GS, Mac OS X (10.6.7)

Posted on Apr 12, 2011 12:31 PM

Reply
3 replies

Apr 12, 2011 5:56 PM in response to The Andy Bob

The Andy Bob wrote:
I'm working on a C++ project where I need to create a GUI. I'm using wxWidgets


Why on earth would you do that?

which is cross platform compatible.


Yes. You get the same ugly, buggy interface on all platforms.

Now I have everything setup to get the form working, but my problem is compiling. I need to have a target that can compile C++ code that does more than just a console line. How do I compile and run C++ code that allows for GUI's? I'm running XCode 4


If you use wxWidgets you have to do everything the wxWidgets way. You can use Xcode as a project organizer and code editor, but that's about it.

Apr 12, 2011 6:44 PM in response to The Andy Bob

The Andy Bob wrote:
I'm aware that it's not pretty. But my question was not answered. I know that i'd just be using Xcode as a code editor, that's exactly what I want. That and a compiler. My question was, is there a way to compile code that uses wxWidgets in Xcode?


Certainly. It would be far easier to just use a standard wxWidgets makefile and create a makefile-based project. You can try to setup all the compiler and linker command line arguments by hand to get it to build "natively" in Xcode, but that seems like a whole lot of work just to get you where the makefile-based project gets you in 2 minutes.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

wxWidgets with C++ in XCode 4

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.