你如何为Mac OS X编写程序?

时间:2021-02-25 02:44:35

Hi just wondering how do you start writing programs for MAC OS X?

您好,想知道如何开始为MAC OS X编写程序?

what language does it use? can I use objective C? which IDE do I use? any licensing fee should I know about.

它使用什么语言?我可以使用目标C吗?我使用哪个IDE?我应该知道任何许可费用。

Thanks.

4 个解决方案

#1


5  

Mac OS X is a great programming platform, as such you can use just about any language you like.

Mac OS X是一个很棒的编程平台,因此您可以使用任何您喜欢的语言。

If you wish to write native applications using the Cocoa framework you'll probably want to be using Objective-C. You can download XCode as an IDE for free.

如果您希望使用Cocoa框架编写本机应用程序,您可能希望使用Objective-C。您可以免费下载XCode作为IDE。

No licensing fees.

没有许可费。

#2


2  

Xcode is the apple supplied IDE, and without external libraries some objective C is always required to build applications.

Xcode是苹果提供的IDE,没有外部库,构建应用程序总是需要一些目标C.

That being said xcode supports multiple types of langauges, and has extensions for many more - and C++ can be spliced in with objective C code - so if you prefer to code in C++ you can write a quick objective C wrapper and do all your own stuff in C++ - or indeed the langauge of your choice. There are a few other open source IDE's but I don't really recommend them - most of them crash on opening in new versions of Mac OS X.

据说xcode支持多种类型的语言,并且还有更多的扩展 - 而且C ++可以用客观的C代码拼接 - 所以如果你喜欢用C ++编写代码,你可以编写一个快速的目标C包装器并做你自己的所有东西用C ++ - 或者你选择的语言。还有一些其他开源IDE,但我并不真正推荐它们 - 大多数都在新版本的Mac OS X中打开时崩溃。

Xcode is found in the developer package on your second mac install disk, or the latest version (with iphone SDK's) can be downloaded once registering on the Apple Developer Website, which you can become a basic member of for free.

Xcode位于第二个mac安装盘上的开发人员包中,或者在Apple Developer Website上注册后可以下载最新版本(带有iphone SDK),您可以免费成为免费的基本成员。

As far as licensing goes, unless you plan to make a game for iOS there are no liscensing fees, unless you want a full subscription to apples developer website, which gives you a few extra things from them.

就许可而言,除非您打算为iOS制作游戏,否则不会收取任何费用,除非您想要完全订阅apple开发者网站,这会为您提供一些额外的东西。

If your trying to write a game, consider using the SDL library, a cross platform wrapper for whole lot of operating system interface functions, including graphics - or you can use it as I do in combination with OpenGL for full 3D Support, hardware acceleration, ect.

如果您正在尝试编写游戏,请考虑使用SDL库,这是一个跨平台包装器,用于包含图形的大量操作系统接口功能 - 或者您可以像我一样使用OpenGL进行全3D支持,硬件加速,等。

#4


0  

The native libraryfor OS X developed by Apple are called Cocoa. It provides OS X's graphical user interface, and other libraries such as Core Data for database acess, Core Animation for fast easy animation and video features in your software. These libraries are written in a mixture of C and Objective C (which is an extension of the C language). For best performance and best integration with the Mac operating system you should probaby look at developing in C, Objective C and perhaps some C++ as well.

Apple开发的OS X本机库称为Cocoa。它提供OS X的图形用户界面,以及其他库,如用于数据库访问的Core Data,用于软件中快速轻松动画和视频功能的Core Animation。这些库是用C和Objective C(它是C语言的扩展)的混合编写的。为了获得最佳性能并与Mac操作系统实现最佳集成,您应该考虑使用C,Objective C以及某些C ++进行开发。

There are some add-on layers that provide acces to the Cocoa libraries from other languages such as Ruby or Python. These are generaly of good quality and work well, so you can use these languages if your aplication does not need the very best performance. They are generaly considered to be easier to learn than the C family of languages and you can become productive very quickly.

有一些附加层可以从其他语言(如Ruby或Python)提供对Cocoa库的访问。这些通常具有良好的质量并且运行良好,因此如果您的应用程序不需要最佳性能,则可以使用这些语言。它们通常被认为比C语言系列更容易学习,您可以非常快速地提高效率。

Beyond that, you can use languages and toolkits that are platform-independent so your software will can run on Linux or Windows as well as the Mac. For example Python comes with a simple built-in GUI toolkit called Tkinter. You can use more powerful cross-platform toolkits such as Qt or WxWidgets with C or C++ but have excellent bindings for Ruby, Python and other langauges. This is an approach I am using of a project, with Python and Qt.

除此之外,您还可以使用与平台无关的语言和工具包,这样您的软件就可以在Linux或Windows以及Mac上运行。例如,Python附带了一个名为Tkinter的简单内置GUI工具包。您可以使用更强大的跨平台工具包,例如Qt或WxWidgets与C或C ++,但具有出色的Ruby,Python和其他语言绑定。这是我使用Python和Qt的项目的一种方法。

Others have mentioned Apple's integrated development environemnt (IDE) called XCode. I have only toyed with it, but it looks very powerful for true native development of Cocoa applications.

其他人提到了Apple的集成开发环境(IDE),称为XCode。我只玩弄它,但它对于Cocoa应用程序的真正本机开发看起来非常强大。

#1


5  

Mac OS X is a great programming platform, as such you can use just about any language you like.

Mac OS X是一个很棒的编程平台,因此您可以使用任何您喜欢的语言。

If you wish to write native applications using the Cocoa framework you'll probably want to be using Objective-C. You can download XCode as an IDE for free.

如果您希望使用Cocoa框架编写本机应用程序,您可能希望使用Objective-C。您可以免费下载XCode作为IDE。

No licensing fees.

没有许可费。

#2


2  

Xcode is the apple supplied IDE, and without external libraries some objective C is always required to build applications.

Xcode是苹果提供的IDE,没有外部库,构建应用程序总是需要一些目标C.

That being said xcode supports multiple types of langauges, and has extensions for many more - and C++ can be spliced in with objective C code - so if you prefer to code in C++ you can write a quick objective C wrapper and do all your own stuff in C++ - or indeed the langauge of your choice. There are a few other open source IDE's but I don't really recommend them - most of them crash on opening in new versions of Mac OS X.

据说xcode支持多种类型的语言,并且还有更多的扩展 - 而且C ++可以用客观的C代码拼接 - 所以如果你喜欢用C ++编写代码,你可以编写一个快速的目标C包装器并做你自己的所有东西用C ++ - 或者你选择的语言。还有一些其他开源IDE,但我并不真正推荐它们 - 大多数都在新版本的Mac OS X中打开时崩溃。

Xcode is found in the developer package on your second mac install disk, or the latest version (with iphone SDK's) can be downloaded once registering on the Apple Developer Website, which you can become a basic member of for free.

Xcode位于第二个mac安装盘上的开发人员包中,或者在Apple Developer Website上注册后可以下载最新版本(带有iphone SDK),您可以免费成为免费的基本成员。

As far as licensing goes, unless you plan to make a game for iOS there are no liscensing fees, unless you want a full subscription to apples developer website, which gives you a few extra things from them.

就许可而言,除非您打算为iOS制作游戏,否则不会收取任何费用,除非您想要完全订阅apple开发者网站,这会为您提供一些额外的东西。

If your trying to write a game, consider using the SDL library, a cross platform wrapper for whole lot of operating system interface functions, including graphics - or you can use it as I do in combination with OpenGL for full 3D Support, hardware acceleration, ect.

如果您正在尝试编写游戏,请考虑使用SDL库,这是一个跨平台包装器,用于包含图形的大量操作系统接口功能 - 或者您可以像我一样使用OpenGL进行全3D支持,硬件加速,等。

#3


#4


0  

The native libraryfor OS X developed by Apple are called Cocoa. It provides OS X's graphical user interface, and other libraries such as Core Data for database acess, Core Animation for fast easy animation and video features in your software. These libraries are written in a mixture of C and Objective C (which is an extension of the C language). For best performance and best integration with the Mac operating system you should probaby look at developing in C, Objective C and perhaps some C++ as well.

Apple开发的OS X本机库称为Cocoa。它提供OS X的图形用户界面,以及其他库,如用于数据库访问的Core Data,用于软件中快速轻松动画和视频功能的Core Animation。这些库是用C和Objective C(它是C语言的扩展)的混合编写的。为了获得最佳性能并与Mac操作系统实现最佳集成,您应该考虑使用C,Objective C以及某些C ++进行开发。

There are some add-on layers that provide acces to the Cocoa libraries from other languages such as Ruby or Python. These are generaly of good quality and work well, so you can use these languages if your aplication does not need the very best performance. They are generaly considered to be easier to learn than the C family of languages and you can become productive very quickly.

有一些附加层可以从其他语言(如Ruby或Python)提供对Cocoa库的访问。这些通常具有良好的质量并且运行良好,因此如果您的应用程序不需要最佳性能,则可以使用这些语言。它们通常被认为比C语言系列更容易学习,您可以非常快速地提高效率。

Beyond that, you can use languages and toolkits that are platform-independent so your software will can run on Linux or Windows as well as the Mac. For example Python comes with a simple built-in GUI toolkit called Tkinter. You can use more powerful cross-platform toolkits such as Qt or WxWidgets with C or C++ but have excellent bindings for Ruby, Python and other langauges. This is an approach I am using of a project, with Python and Qt.

除此之外,您还可以使用与平台无关的语言和工具包,这样您的软件就可以在Linux或Windows以及Mac上运行。例如,Python附带了一个名为Tkinter的简单内置GUI工具包。您可以使用更强大的跨平台工具包,例如Qt或WxWidgets与C或C ++,但具有出色的Ruby,Python和其他语言绑定。这是我使用Python和Qt的项目的一种方法。

Others have mentioned Apple's integrated development environemnt (IDE) called XCode. I have only toyed with it, but it looks very powerful for true native development of Cocoa applications.

其他人提到了Apple的集成开发环境(IDE),称为XCode。我只玩弄它,但它对于Cocoa应用程序的真正本机开发看起来非常强大。