Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Graphics in C++ and Xcode

Hello!
I'm trying to learning C++, and use Xcode for this.
How can I get graphics into C++ with Xcode?
Are there graphic libraries in Xcode that can be used in C++?
Maybe there are none because Xcode console cannot show graphics.
Thank you very much.

iMac Intel Core Duo, Mac OS X (10.5.4)

Posted on Oct 26, 2008 11:58 AM

Reply
Question marked as Best reply

Posted on Oct 26, 2008 5:24 PM

You are talking about some disparate technologies there. You can't really compare then in the same sentence. Also, your question is very restrictive in that you are asking about C++ libraries for the Mac that you can use with Xcode. Such things do exists, but if you are still learning Xcode, they may be too difficult right now.

I would recommend narrowing down exactly what you want to do on the Mac - graphics-wise. It may be something that you could easily do in Cocoa or Carbon without getting overwhelmed.

A good place to start would be to look at the Developer examples and find one that does something similar to what you want. Study that example and adapt it. It may not actually use C++, but then, that is a different issue. Learning C++ and learning graphics do not really go together. You can do one - and the other - and eventually combine them - but not at first.
8 replies
Question marked as Best reply

Oct 26, 2008 5:24 PM in response to rt200

You are talking about some disparate technologies there. You can't really compare then in the same sentence. Also, your question is very restrictive in that you are asking about C++ libraries for the Mac that you can use with Xcode. Such things do exists, but if you are still learning Xcode, they may be too difficult right now.

I would recommend narrowing down exactly what you want to do on the Mac - graphics-wise. It may be something that you could easily do in Cocoa or Carbon without getting overwhelmed.

A good place to start would be to look at the Developer examples and find one that does something similar to what you want. Study that example and adapt it. It may not actually use C++, but then, that is a different issue. Learning C++ and learning graphics do not really go together. You can do one - and the other - and eventually combine them - but not at first.

Oct 27, 2008 2:45 AM in response to etresoft

Thanks for your reply.
My purpose was to learn some popular programming language which hopefully can also handle graphics (for example to build a user interface for my programs ).
Write or wrong, but I chose C++ , and so far wrote a couple of little programs in it, using Xcode, a very handy tool.

The programs work fine, but lack a nice-looking user interface, i.e. something with buttons, fields for a user to fill, colored background, etc .

I can see now that my knowledge is too limited for me to be able to use other Xcode tools to add such graphics to my programs.

What languages people normally use to write their programs c/w with colored user interfaces?

Oct 27, 2008 12:11 PM in response to rt200

I wouldn't say that. I used it for 14 years almost exclusively. I think it is more accurate to say that vendors provide their own methods for doing graphics. Usually it is best to do as the vendor wishes. Microsoft used to support C++ with MFC, but not so much anymore. Apple used to support C++ with MacApp, but no one ever used it. There are some 3rd party libraries (Qt, Wx, etc) that are either built on C++ or have C++ interfaces. Usually they are Linux libraries that have been ported to run on Macs and/or Windows. However, if you choose to use those, you do so because you just want to or you need cross-platform compatibility. By doing so, you are leaving the mainstream (of the niche that is MacOS X).

Graphics are tied very closely to the OS and a vendor's implementation. You go against the stream at your own risk. Lots of higher level code is done with C++. C++ can interface with just about any graphics library with no problem.

Graphics in C++ and Xcode

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