i know c and I want to develop applications with GUI for Mac OS. Where do I start?
Learn Objective-C.
Then pick up Cocoa (and all of the Frameworks that go with it)
- Buy Apple computer
- Install XCode from supplied DVD
- Run Software Update from system menu
- Run XCode
- Select Help menu, select "Developer Documentation"
- Click on any of the many things that say things like "Quick Start" or "Getting Started with XCode".
- Read
- Program
- GoTo 7.
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.
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.
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.
You can also try with QT and C++. Try here:
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.
© 2022 - 2024 — McMap. All rights reserved.