Native GUI Application

closed account (jwkNwA7f)
I have been told that I can not make a GUI natively using C++ in Xcode on OS X. But then, how are the libraries made to make the GUI? Like qt, openGL, wxWidgets, maybe boost, etc.. I have been told to just use the libraries, but I enjoy making libraries among other things.

Thank you!
Hi there,

Those libraries are written in such a way that they provide a uniform interface to you, but under the hood they have different code for the platforms they support. For instance, to show a window on the screen in windows, you'll need to use the windows API, to do the same on linux, you will need to use the X11 API. If you only want your program to work on OS X I believe Carbon/Cocoa is what you need (though I'm no mac-expert).

Writing such a library yourself would be an enormous task though, not to mention that the many good options out there have been tried and tested by many users and most of them are under continuous development.

Reinventing the wheel can sometimes be educational, but a lot of the times it's just superfluous.

Hope that helps.

All the best,
NwN

closed account (jwkNwA7f)
I knew that, but I have been told that you can't use Cocoa with C++, so do the libraries have that part written in Objective-C or another language?
Hi,

Have a look at some of QT's code for mac, maybe that will answer your questions:

https://qt.gitorious.org/qt/qt/source/b12a8d47ba8a803cae88718249b8d3f7d4a85948:src/gui/accessible

All the best,
NwN
closed account (jwkNwA7f)
Thank you, I'll have a look at it.
Topic archived. No new replies allowed.