Objective-C 的 Eclipse 插件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1220285/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse plugin for Objective-C?
提问by Stefan Kendall
I'm going to learn Objective-C, and I was wondering if there was an eclipse plugin out there to do things like syntax highlighting and easy compiling/project management. I did some preliminary searching, but I couldn't find anything.
我要学习Objective-C,我想知道是否有一个eclipse插件可以做一些像语法高亮和简单编译/项目管理的事情。我做了一些初步的搜索,但我找不到任何东西。
What's my best I can do for an IDE?
我能为 IDE 做的最好的事情是什么?
I don't have a mac.
我没有mac。
采纳答案by akf
for Objective-C the best is Xcode - if you have a Mac. There are some other IDEs out there like KDevelopthat offer support for other OSes. The only thing I have seen for Eclipse is objectiveeclipse, but I do not have any experience with it.
对于 Objective-C,最好的是 Xcode——如果你有一台 Mac。还有一些其他的 IDE,比如KDevelop,它们为其他操作系统提供支持。我在 Eclipse 中看到的唯一东西是objectiveeclipse,但我没有任何经验。
回答by Quinn Taylor
The other answers provide pretty good direct answers. However, my first instinct is to jump to the meta-question: "What is your reason for learning Objective-C?"The reason I'd ask that is because the guidance I'd give depends greatly on your motivations. For example...
其他答案提供了非常好的直接答案。然而,我的第一反应是跳到元问题:“你学习 Objective-C 的原因是什么?” 我之所以这么问是因为我给出的指导在很大程度上取决于你的动机。例如...
- You have heard that Objective-C is a powerful language and want to see if using it will make your programs cooler, easier to write, whatever. I'll be frank — unless you're planning to eventually do Mac/iOS development, there's little point in learning Objective-C, other than academic curiosity. I'm a longtime Apple guy, and I love Objective-C, but if you are on another operating system, and plan to stay on it for the foreseeable future, there's little point. Objective-C has some extremely cool features, but the benefits of the language itself are generally not compelling for most people. It becomes very powerful when coupled with the Cocoa frameworks provided by Apple. GNUstep provides a degree of interoperability, but if you're going cross-platform, there are better options.
- You're planning to write Mac/iOS software, but don't have a Mac yet. If you're at all serious, I recommend getting a Mac sooner rather than later. While you canlearn Objective-C using an IDE on another platform, nearly all Objective-C tutorials and books assume a Mac environment. There will be practically zero support for third-party tools, especially on the forums and lists that are likely to be most helpful to you when learning. (Of course, I recommend at least considering a Mac to anyone, not just people learning Objective-C. You can dual-boot to Windows if needed, so it's a more flexible development investment. Still, I know not everyone can drop cash for a new Mac.)
- You're planning to write Mac/iOS software, but want to do it all from a PC. If this were the case, I'd suggest stopping now and re-evaluating priorities, for several reasons.
- Apple's tools are the besttools for developing Mac/iOS apps, bar none. Not developing on a Mac puts you at a huge disadvantage. Imagine trying to develop .NET software in Eclipse, KDevelop, or emacs. It may be possible, but it's not a smart way to do things.
- Unless you use a Mac regularly, you'll never understand what a good Mac app feels like, or how to design one. Consequently, you'd be likely to get user complaints over issues that may not make sense to you, and ill-equipped to address them.
- Third-party support for Objective-C and Cocoa will always lag behind that of Apple, and have a different set of bugs. You won't get the best experience, and neither will users. Coding for two Objective-C implementations is likely to drive you nuts in record time.
- Most non-Mac people don't care about Objective-C, so language plugins and compilation support are unlikely to be well-developed, let alone exist in the first place. Aside from the code editor, you'd need libraries to compile and link against. Again, Xcode is the gold standard for Objective-C. Besides, project setup and administration in Eclipse is a pain even for Java.
- 你听说过 Objective-C 是一种强大的语言,想看看使用它是否会让你的程序更酷、更容易编写,等等。坦率地说——除非你打算最终进行 Mac/iOS 开发,否则学习 Objective-C 没有什么意义,除了学术好奇心。我是 Apple 的老员工,我喜欢 Objective-C,但如果你使用的是另一个操作系统,并计划在可预见的未来继续使用它,那么就没有意义了。Objective-C 有一些非常酷的特性,但语言本身的好处对大多数人来说通常并不引人注目。与 Apple 提供的 Cocoa 框架结合使用时,它变得非常强大。GNUstep 提供了一定程度的互操作性,但如果您要跨平台,还有更好的选择。
- 您计划编写 Mac/iOS 软件,但还没有 Mac。如果您是认真的,我建议您尽早购买 Mac。虽然您可以使用另一个平台上的 IDE来学习 Objective-C,但几乎所有的 Objective-C 教程和书籍都假定在 Mac 环境中。对第三方工具的支持几乎为零,尤其是在可能对您学习最有帮助的论坛和列表中。(当然,我建议任何人至少考虑使用 Mac,而不仅仅是学习 Objective-C 的人。如果需要,您可以双启动到 Windows,因此这是一种更灵活的开发投资。不过,我知道不是每个人都可以为一台新的 Mac。)
- 您打算编写 Mac/iOS 软件,但希望在 PC 上完成所有工作。如果是这种情况,我建议现在停止并重新评估优先级,原因有几个。
- Apple 的工具是开发 Mac/iOS 应用程序的最佳工具,没有之一。不在 Mac 上开发会让你处于巨大的劣势。想象一下尝试在 Eclipse、KDevelop 或 emacs 中开发 .NET 软件。这可能是可能的,但这不是一种聪明的做事方式。
- 除非您经常使用 Mac,否则您永远不会理解好的 Mac 应用程序是什么样的,或者如何设计一个应用程序。因此,您可能会收到用户对您可能没有意义的问题的投诉,并且没有能力解决这些问题。
- 第三方对 Objective-C 和 Cocoa 的支持将始终落后于 Apple,并且存在一组不同的错误。您不会获得最佳体验,用户也不会。为两个 Objective-C 实现编码可能会让你在创纪录的时间内发疯。
- 大多数非 Mac 用户并不关心 Objective-C,因此语言插件和编译支持不太可能得到很好的开发,更不用说存在了。除了代码编辑器之外,您还需要编译和链接库。同样,Xcode 是 Objective-C 的黄金标准。此外,即使对 Java 来说,Eclipse 中的项目设置和管理也是一件痛苦的事情。
I realize this doesn't directly answer your question, but I hope it provides some insight, whether to the asker or to someone else in the same situation. Cheers!
我意识到这并不能直接回答您的问题,但我希望它提供一些见解,无论是对提问者还是对处于相同情况的其他人。干杯!
回答by Jorge
- I tried for some time to use my MS Windows/Eclipsebased environments for developing iPhone/Objective-Capps. I gave up.
- I tried for some time to build a reasonable hackintosh (up to my abilities... apparently fairly limited on this)... but on 2009 I gave up. (apparently now there are better tutorials/it is easier to do it?)
- I figured out that if I bought an iMacand use all the previously listed time developing iOS apps, I would be rich. So I bought a Mac.
- Obviously I am not rich now. But at least a happy Mac user ;-)
- 一段时间以来,我尝试使用基于MS Windows/Eclipse的环境来开发iPhone/Objective-C应用程序。我放弃。
- 我尝试了一段时间来构建一个合理的 hackintosh(根据我的能力......显然在这方面相当有限)......但在 2009 年我放弃了。(显然现在有更好的教程/这样做更容易?)
- 我发现如果我买了一台iMac并使用之前列出的所有时间来开发 iOS 应用程序,我就会变得富有。所以我买了一台Mac。
- 显然我现在并不富有。但至少是一个快乐的 Mac 用户 ;-)
One note aside, I noticed that even some Eclipseplugin project (for Objective-C development) I was hoping was going to take-off, was shut down.
除了一个注意事项,我注意到甚至一些我希望能够起飞的Eclipse插件项目(用于 Objective-C 开发)也被关闭了。
Get a Mac. Or enjoy the process of not getting it. After all, it's the journey, not the destination.
得到一台 Mac。或者享受没有得到它的过程。毕竟,这是旅程,而不是目的地。
-- Jorge
- 乔治
回答by Thomas Müller
If you don't have a Mac and want to learn Objective-C on Windows you should have a look at GNUstep (http://www.gnustep.org/). I think you get packages for Windows and it comes with an IDE. GNUstep contains a lot of the Cocoa classes so it might be relatively easy to get started. When I tried GNUstep on Windows a while back it was quite buggy for me, though.
如果您没有 Mac 并且想在 Windows 上学习 Objective-C,您应该看看 GNUstep ( http://www.gnustep.org/)。我认为您获得了适用于 Windows 的软件包,并且它带有一个 IDE。GNUstep 包含许多 Cocoa 类,因此上手可能相对容易。不久前,当我在 Windows 上尝试使用 GNUstep 时,它对我来说相当麻烦。
A text editor you could try is E (http://www.e-texteditor.com/index.html). It's a clone of TextMate (a popular editor on the Mac) and you can install bundles for all sorts of things, including Objective-C support. (http://svn.textmate.org/trunk/Bundles/). You get a free trial, so maybe just give it a shot.
您可以尝试的文本编辑器是 E ( http://www.e-texteditor.com/index.html)。它是 TextMate(Mac 上流行的编辑器)的克隆,您可以为各种东西安装包,包括 Objective-C 支持。(http://svn.textmate.org/trunk/Bundles/)。您可以免费试用,所以不妨试一试。
I hope that helps. I have hardly done any Objective-C programming on Windows, but that's what I would look at first, GNUstep and possibly E.
我希望这有帮助。我几乎没有在 Windows 上做过任何 Objective-C 编程,但这就是我首先要看的,GNUstep 和可能的 E。
回答by im_chc
Try some online compilers, if u just want to pick up Obj-C's syntax alone:
尝试一些在线编译器,如果你只想单独学习 Obj-C 的语法:
There should be a lot more online, try to search "online compilers objective-c" w/ ur fav search engine
网上应该有更多,尝试使用您最喜欢的搜索引擎搜索“在线编译器objective-c”
回答by Kiarash
回答by Yves McDonald
I once tried to pull together an open-source, iPod/iPhone development environment, but the process took too long and gave up eventually. I got a Mac instead. From there, the tools were free and I started thinking and coding in Objective-C.
我曾经尝试将开源的 iPod/iPhone 开发环境整合在一起,但这个过程耗时太长,最终放弃了。我换了一台 Mac。从那时起,这些工具都是免费的,我开始用 Objective-C 进行思考和编码。
I spotted a book about open-source software development (under Linux). Publisher is good ol' O`Reilly. Might worth having a look.
我发现了一本关于开源软件开发(在 Linux 下)的书。出版商是好 ol' O`Reilly。可能值得一看。
On a similar thread of thoughts, writing up apps in Objective-C for Linux could bring a greater acceptance of the language and framework. For now, it is reserved indeed for those interested in app development for Mac or iPhone/iPad/iPod devices.
在类似的思路上,用 Objective-C 为 Linux 编写应用程序可以带来更多人对该语言和框架的接受。目前,它确实是为那些对 Mac 或 iPhone/iPad/iPod 设备的应用程序开发感兴趣的人保留的。
In addition, if the objective-C runtime module is light enough, it might be suitable for game console homebrews too: I wrote an app for Nintendo`s DS console and ended up writing lots of C++ lines of codes. I feel it could have been done with less coding with ObjC, and an encapsulated version of libnds, but, to my knowledge, GNUStep hasn't been ported to the DS Open Source toolchain yet (www.devkitpro.org).
另外,如果objective-C运行时模块足够轻,它可能也适用于游戏机自制程序:我为任天堂的DS控制台编写了一个应用程序,最终编写了大量C++代码行。我觉得用 ObjC 和一个封装的 libnds 版本可以减少编码,但是,据我所知,GNUStep 还没有被移植到 DS 开源工具链(www.devkitpro.org)。
Happy Coding!
快乐编码!
回答by Amitay Drummer
回答by awesomo4000
tl;dr : http://code.google.com/p/objectiveclipse/
TL;博士:http: //code.google.com/p/objectiveclipse/
project has closed down though. but it's still there ready to be used.
虽然项目已经关闭。但它仍然可以使用。
回答by im_chc
Edit:
编辑:
Here is an article talking about setting up an ojective-c environment in windows, it said only GNUstep MSYS System and the GNUStep Core package are needed: http://www.tutorialspoint.com/objective_c/objective_c_environment_setup.htm
这是一篇关于在 Windows 中设置 ojective-c 环境的文章,它说只需要 GNUstep MSYS System 和 GNUStep Core 包:http://www.tutorialspoint.com/objective_c/objective_c_environment_setup.htm
Recently I found out that Mingw includes the objective-c package of gcc (http://mingw.org/wiki/MinGW) - Mingw is a windows port of GCC, the latter includes support of many languages (C, java, fortran)
最近我发现Mingw包含了gcc的objective-c包(http://mingw.org/wiki/MinGW)——Mingw是GCC的windows端口,后者支持多种语言(C、java、fortran)
You can try it, though I haven't do so before. However, be prepared that some libraries might not be supported, especially those that are UI-related.It might be a good idea to look at info about gcc's supprot of objective c to have an idea in what extent does mingw supports objective-c. But for this issue, you might like to look at https://stackoverflow.com/a/9196196/214728
你可以试试,虽然我以前没有这样做过。但是,请准备好可能不支持某些库,尤其是那些与 UI 相关的库。查看有关 gcc 支持目标 c 的信息以了解 mingw 支持目标 c 的程度可能是一个好主意。但是对于这个问题,你可能想看看https://stackoverflow.com/a/9196196/214728

