cGio
cGio

Reputation: 159

C + GUI + Mac OS

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

Upvotes: 6

Views: 8494

Answers (8)

1jss
1jss

Reputation: 33

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.

Upvotes: 0

Chrisuu
Chrisuu

Reputation: 302

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.

Upvotes: 3

Andrea Girardi
Andrea Girardi

Reputation: 4437

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

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

Upvotes: 1

paul
paul

Reputation: 139

  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.

Upvotes: 10

David Thornley
David Thornley

Reputation: 57046

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.

Upvotes: 1

Naaff
Naaff

Reputation: 9333

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.

Upvotes: 1

Brian R. Bondy
Brian R. Bondy

Reputation: 347416

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.

Upvotes: 4

Justin Niessner
Justin Niessner

Reputation: 245449

Learn Objective-C.

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

Upvotes: 17

Related Questions