C + GUI + Mac OS
Asked Answered
C

8

6

i know c and I want to develop applications with GUI for Mac OS. Where do I start?

Combustible answered 30/3, 2010 at 14:29 Comment(0)
E
17

Learn Objective-C.

Then pick up Cocoa (and all of the Frameworks that go with it)

Embryogeny answered 30/3, 2010 at 14:30 Comment(1)
I agree with this and the other comments. While it is possible to develop GUI apps with other languages/frameworks, Obj-C + Cocoa is the way to go.Upi
O
10
  1. Buy Apple computer
  2. Install XCode from supplied DVD
  3. Run Software Update from system menu
  4. Run XCode
  5. Select Help menu, select "Developer Documentation"
  6. Click on any of the many things that say things like "Quick Start" or "Getting Started with XCode".
  7. Read
  8. Program
  9. GoTo 7.
Orthotropic answered 30/3, 2010 at 18:22 Comment(2)
This is the best and only useful algorithmic method of learning to program on a Mac I have encountered so far.Crimmer
These steps are not much meaningful. What to read ?Sunil
N
4

Downloading xcode would be your first step. It's the main development environment for mac development and it's free. Then you'd want to get a book on Cocoa w/ Objective-C or Carbon w/ C. Apple is pushing Cocoa more.

Normi answered 30/3, 2010 at 14:32 Comment(0)
B
3

The Simple DirectMedia Layer (SDL) library is yet another option. It is a cross-platform development library that can be used to write GUI-based applications for Mac OS in C.

Brassware answered 7/1, 2015 at 21:47 Comment(1)
Is this support for windows and linux as well ?Sunil
D
1

While there is Carbon, it's a framework that's not first-class going forward. If you want to make sure that you can access all of the features of Mac OS X, you'll want to learn Objective-C and use Cocoa.

Danby answered 30/3, 2010 at 14:33 Comment(0)
M
1

I believe all Macs nowadays come with a complete set of development tools. They're not pre-loaded on the Mac, but are in the CD-ROM or DVD-ROM package. Alternately, you can go to Apple's site and poke around until you find the development section, and download Xcode. (It'll be the same thing, but possibly a newer version.)

Mac OSX uses a language called Objective-C, which is C extended with OO abilities that are more like Smalltalk than the more usual Simula type (in C++, say). While you don't actually have to use it much, it is how you'll be writing interface code.

Further, it uses the Cocoa framework. There was a framework called Carbon, which was a cleanup and redesign of the pre-Mac OSX Macintosh system facilities, but it's being left behind.

You can find free information on either if you look, or you can buy books on them. Books are probably a better resource to learn from.

Margrettmarguerie answered 30/3, 2010 at 14:38 Comment(0)
S
1

You can also try with QT and C++. Try here:

http://qt.nokia.com/products/platform/qt-for-mac

Southland answered 3/6, 2010 at 11:11 Comment(0)
R
0

If you specifically want to use C and not learn another language (as several other answers suggest) SDL2 is a good option.

SDL2 is in itself very low level and mostly used for games, but can be be built upon to create really lightweight and performant full GUI applications. See for example the C9-gui project that puts a document model and layout engine on top of SDL2.

SDL2 is (as noted in another answer) cross platform, which means that your application will be portable to several platforms (officially Windows, macOS, Linux, iOS, and Android, but several more are unofficially supported). The downside is that no native GUI controls can be used.

Rabbin answered 12/8 at 5:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.